News for hackers. Stuff that matters.
Re:Command-line tools can be faster than your Hadoop cluster by omoikane on Sunday January 18, 2015 @03:06PM (#8908650)
"grep <pattern> <files>" is not the same as "cat <files> | grep <pattern>", in that the former will prefix lines with filenames if there is more than one input file. What you want instead is "grep -h <pattern> <files>".

The advantage of using cat, therefore, is the few seconds of laziness saved in not reading the manual.

Re:Command-line tools can be faster than your Hadoop cluster by salgernon on Sunday January 18, 2015 @03:28PM (#8908730)
The advantage to using "cat foo | grep pattern" is that it is trivial to ^p and edit the pattern before adding the next pipeline sequence.
Re:Command-line tools can be faster than your Hadoop cluster by philsnow on Sunday January 18, 2015 @10:49PM (#8910195)
fwiw

    $ <filename grep <pattern>
no shell I'm aware of restricts you to placing redirections at the end, you can throw them on the beginning no problem.