4 ms·
Seeing as it also reads multiple files and/or standard input, I am reminded of this: http://harmful.cat-v.org/cat-v/ http://harmful.cat-v.org/cat-v/ "cat isn'
by userbinator 12y ago
Seeing as it also reads multiple files and/or standard input, I am reminded of this:
http://harmful.cat-v.org/cat-v/ http://harmful.cat-v.org/cat-v/
"cat isn't for printing files with line numbers, it isn't for compressing multiple blank lines, it's not for looking at non-printing ASCII characters, it's for concatenating files."
Why not make it just a syntax highlighting filter? Or is the "cat" functionality too trivial to be factored out, and thus it has grown to include other things? I suppose it's a bit of a philosophical question...
- smorrow 12y agoMaybe it's like grep. `grep asterisk` is different from `cat asterisk |grep`, in that it knows which file it's in and which line number of that file the match is on.
- rtz12 12y agoI thought the same thing. There is literally no reason to reimplement cat in a tool for highlighting source code.