4 ms·
> cat > Catenate TIL the words concatenate and catenate exist, although they seem to have almost the same exact meaning
by TheSoftwareGuy 6y ago
> cat
> Catenate
TIL the words concatenate and catenate exist, although they seem to have almost the same exact meaning
- leephillips 6y agoAnd neither one is “obscure”, by a long shot.
- saagarjha 6y agoI haven’t heard people use catenate much.
- dx87 6y agoI'd heard of concatenate, but never catenate. I guess concatenate is a verb, and catenate is an adjective.
- AdmiralAsshat 6y ago"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.
- i_am_programmer 6y agoLinks 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".
- mprovost 6y agoI 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.
- comfydragon 6y agoMaybe 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.
- chrisfinazzo 6y agoThe 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.
- saagarjha 6y agoHey, some people do use it to combine files!
- chrisfinazzo 6y agoI'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.
- konjin 6y agoI'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.
- chrisfinazzo 6y agoHuzzah. You win this round.
- kevinmgranger 6y agoTo be fair, it's still linking one file together with... uh, nothing.
- mprovost 6y ago