Re:A Unix Shell poster from 1983
by TeMPOraL on Monday October 15, 2018 @04:26AM
(#18218216)
So the "improper" use of cat, for printing files on screen, dates back to at least 1983. I consider it legitimized.
[ Parent
| on HN ]
I never liked this "improper" moniker.
If you're writing a quick script it's way more convenient and readable to just put the input where you'd expect it, at the start of the pipeline, as its own thing. It's a bit more inefficient, but you don't go mucking around with file input parameters for the commands later on in the pipeline, especially as you're moving them around and changing them.
Cat is fine for reading a file. It’s when you ‘cat <file> | grep <word>‘ that it becomes improper use.
TeMPOraL got the adjective wrong. The correct adjective is "useless".