Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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).


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.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: