News for hackers. Stuff that matters.
Re:In Unix, what do some obscurely named commands stand for?... by chrisfinazzo on Wednesday September 09, 2020 @11:12AM (#24421905)
The dictionary defines it as "link together in a chain or series", but in practice on many UNIX systems it's come to mean simply, 'write to stdout' which unless you get into redirection, is just a user's terminal.

I get that the big metaphor was 'small pieces, loosely joined', but this one has always seemed half-baked to me - e.g, it's often too small to be useful without a bit more effort by you, the person typing things.

Re:In Unix, what do some obscurely named commands stand for?... by konjin on Wednesday September 09, 2020 @11:24AM (#24422032)
I'll have you know I had to use cat and tac in the way they were intended a few days ago.

I can't remember for the life of me why, but I was shocked.

Re:In Unix, what do some obscurely named commands stand for?... by chrisfinazzo on Wednesday September 09, 2020 @11:29AM (#24422090)
Huzzah. You win this round.
Re:In Unix, what do some obscurely named commands stand for?... by saagarjha on Wednesday September 09, 2020 @11:14AM (#24421924)
Hey, some people do use it to combine files!
Re:In Unix, what do some obscurely named commands stand for?... by chrisfinazzo on Wednesday September 09, 2020 @11:26AM (#24422057)
I'm not arguing that, but to do what most people think of w.r.t what comes to mind when you talk about cat requires redirection.

From the man page:

The command:

           cat file1
will print the contents of file1 to the standard output.

The command:

           cat file1 file2 > file3
will sequentially print the contents of file1 and file2 to the file file3, truncating file3 if it already exists. See the manual page for your shell (i.e., sh(1)) for more information on redirection.
Re:In Unix, what do some obscurely named commands stand for?... by mprovost on Wednesday September 09, 2020 @12:02PM (#24422414)
cat has been (ab)used to output files to a terminal for a long time. BSD 1 has a program cat3a [0] that Bill Joy wrote in 1977(!) to quickly write files to an ADM-3A terminal [1]. If you look at the keyboard it has arrows on the HJKL keys which is where vi got its navigation from. (Also the escape key was next to Q!)

[0] https://github.com/dspinellis/unix-history-repo/blob/BSD-1-S... [1] https://en.wikipedia.org/wiki/ADM-3A

Re:In Unix, what do some obscurely named commands stand for?... by kevinmgranger on Wednesday September 09, 2020 @11:35AM (#24422144)
To be fair, it's still linking one file together with... uh, nothing.