News for hackers. Stuff that matters.
Re:Unix Commands I Abuse Every Day by a3_nm on Thursday September 06, 2012 @02:45AM (#4483118)
Interestingly, there are some circumstances where you actually want "cat file | program" and not "program < file". The case I have in mind is when file is actually a named FIFO which was not opened for writing. If you use cat, program will still run and only reads to stdin will block (but it can perform other things, possibly in different threads). If you use '<', opening stdin will block and program will probably block altogether.
Re:Unix Commands I Abuse Every Day by ralph on Thursday September 06, 2012 @05:07AM (#4483403)
With < on a FIFO it's the shell that blocks on opening before the command, e.g. cat, is run.