this post was submitted on 17 Mar 2024
1166 points (97.5% liked)

Programmer Humor

19497 readers
1261 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] magic_lobster_party@kbin.run 20 points 7 months ago (2 children)

I sometimes use cat to concatenate files. For example, add a header to a csv file without manually copy and paste it. It’s rare, but at least more frequent than using touch.

[–] wewbull@feddit.uk 19 points 7 months ago
$ cat file1 > output_file
$ cat file2 >> output_file
$ cat file3 >> output_file

I'm sorry!

[–] dan@upvote.au 4 points 7 months ago* (last edited 7 months ago)

That's its intended purpose - combining files together (the opposite of split). See the first line of the man page: https://man7.org/linux/man-pages/man1/cat.1.html