News for hackers. Stuff that matters.
Re:Feature comparison of ack, ag, Git-grep, grep and ripgrep by blablabla123 on Sunday October 24, 2021 @01:10PM (#28979853)
Or "Limit length of output lines"... how about

   $ grep ... | head -n ...
I think this feature comparison misses how grep is supposed to be used. (See also "Pipe output through a pager or other command")
Re:Feature comparison of ack, ag, Git-grep, grep and ripgrep by waynesonfire on Sunday October 24, 2021 @05:54PM (#28982293)
I agree. I use grep in conjunction with find and parallel to achieve a number of features not native to grep that are built-in to these other tools.

I prefer tools designed with does one thing well philosophy. It lets me scale my knowledge. I can solve many problems with find and parallel not supported by these grep clones.

Re:Feature comparison of ack, ag, Git-grep, grep and ripgrep by burntsushi on Sunday October 24, 2021 @06:01PM (#28982338)
ripgrep degrades just fine to a normal grep tool. And you can use it in `find` pipelines.

> I prefer tools designed with does one thing well

This is pretty unlikely. For example, you probably use a grep tool that will also do recursive directory traversal for you. It probably even has flags for defining filters on that traversal. Why use such a tool when `find` already does recursive directory traversal for you?

Re:Feature comparison of ack, ag, Git-grep, grep and ripgrep by petdance on Sunday October 24, 2021 @04:53PM (#28981798)
"grep | head" doesn't limit the length of output lines, but "grep | cut" would.

However, ack and ripgrep's default unpiped output is grouped by file, and if you pipe the output, it doesn't do the grouped output.

The idea of "supposed to be used" is also different for ack than it is for grep. ack is specifically less of a general-use tool than grep. It's meant for searching source code. This is also why I have never said that ack is a replacement for grep.

Re:Feature comparison of ack, ag, Git-grep, grep and ripgrep by ptomato on Sunday October 24, 2021 @04:51PM (#28981787)
that limits the number of output lines, not the length.