Hacker News new | ask | show | jobs
by arundelo 2422 days ago
I guess the author was thinking of how cat's original purpose is to concatenate multiple files, not show just one file. (But I certainly don't think using cat in the latter way is a misuse.)

There's also a commonly noted "unnecessary use of cat" where people do this:

  cat file.txt | grep foo
instead of this:

  <file.txt grep.foo
but that's not relevant to bat (which can be used unnecessarily in the same way).
2 comments

Or ‘grep foo file.txt’
What's the name of the bash feature with the '<' before the filename? I want to read the docs on it but I don't even know what to search for.