6 ms·
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 i
by arundelo 7y 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).
- weaksauce 7y agoOr ‘grep foo file.txt’
- Zhyl 7y agoWhat'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.
- detaro 7y agoinput redirection: https://www.tldp.org/LDP/abs/html/io-redirection.html https://www.tldp.org/LDP/abs/html/io-redirection.html