News for hackers. Stuff that matters.
Re:SICP taught in Python 3 - UC Berkeley online by micaeked on Friday January 20, 2012 @08:57PM (#3492257)
can you please clarify:

- correct definition of 'cat'

- what is wrong with '$ cat file | grep word"

edit: formatting

Re:SICP taught in Python 3 - UC Berkeley online by kc5tja on Friday January 20, 2012 @09:22PM (#3492329)
Correct definition of 'cat' -- a tool to concatenate one or more files sequentially into a single output stream. E.g., cat file1 file2 file3 >output-file

what is wrong with... -- "grep word file" takes fewer keys to type and uses fewer resources (important on a heavily loaded server with tons of processes which may well prove compromised and you're trying to peruse the logs for evidence. Been there, done that, got the t-shirt, and donated it to the local shelter).

Re:SICP taught in Python 3 - UC Berkeley online by notajith on Saturday January 21, 2012 @01:01AM (#3492760)
People nag me about cat'ing stuff to grep, and I explain that it's just easier to edit the pattern when it is the last argument to the command. Also it of course fits better in the toolchain when I need to replace the input or the grep with something else.