6 comments

[ 0.18 ms ] story [ 24.2 ms ] thread
I didn’t know it concatenates file
Really?

> Concatenate FILE(s) to standard output.

Sounds awfully close to me.

Strange: it says right there "concatenate files and print on the standard output".

Also, everybody is using it to print files to the terminal.

You're simply mistaken and should not trust those who rant about "useless use of cat" and such things.

Maybe I should’ve used a different title, the biggest “revelation” for me was that cat will concatenate files. It’s such a simple command, I never bothered to look at the man page. Although I still find it interesting that it’s original purpose was concatenation and not purely displaying file
> Strange: it says right there "concatenate files and print on the standard output".

Standard output is not necessarily a terminal.

The terminal is the most-used destination of standard output, so it clearly includes the terminal.