News for hackers. Stuff that matters.
Re:In Unix, what do some obscurely named commands stand for?... by TheSoftwareGuy on Wednesday September 09, 2020 @10:56AM (#24421702)
> cat > Catenate

TIL the words concatenate and catenate exist, although they seem to have almost the same exact meaning

Re:In Unix, what do some obscurely named commands stand for?... by dx87 on Wednesday September 09, 2020 @11:05AM (#24421828)
I'd heard of concatenate, but never catenate. I guess concatenate is a verb, and catenate is an adjective.
Re:In Unix, what do some obscurely named commands stand for?... by AdmiralAsshat on Wednesday September 09, 2020 @11:27AM (#24422072)
"Concatenate" seems redundant to me, as the Latin prefix "con" means "together" and the root "caten" is a chain. So technically it's "chain together", but a chain is already a thing that is linked together.

My Latin is rusty, but IIRC "con" can optionally just be added for emphasis, e.g. "iacere": to throw, but "conicere":to hurl. Maybe that's what was done here.

Re:In Unix, what do some obscurely named commands stand for?... by i_am_programmer on Wednesday September 09, 2020 @11:39AM (#24422195)
Links in a chain are already together. You absolutely can chain 2 things together that are not the chain itself. Where chain is used as a verb to describe the tying of things together. Saying chain together absolutely makes sence. Example "His ankles were chained together".
Re:In Unix, what do some obscurely named commands stand for?... by mprovost on Wednesday September 09, 2020 @12:56PM (#24423003)
I thought maybe they chose "cat"enate to avoid a naming clash with a "con" command but looking back through the early Unix sources there doesn't appear to have been one.
Re:In Unix, what do some obscurely named commands stand for?... by comfydragon on Wednesday September 09, 2020 @03:08PM (#24424611)
Maybe it was to avoid confusion with Lisp's "cons" which conventionally (or always? It's been a while...) adds to the head of a list, whereas "cat" is a bit closer to adding to the tail. This is pure speculation on my part.
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.
Re:In Unix, what do some obscurely named commands stand for?... by leephillips on Wednesday September 09, 2020 @11:05AM (#24421820)
And neither one is “obscure”, by a long shot.
Re:In Unix, what do some obscurely named commands stand for?... by saagarjha on Wednesday September 09, 2020 @11:13AM (#24421921)
I haven’t heard people use catenate much.