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

Programmer Humor

19706 readers
124 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
[–] [email protected] 20 points 8 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.

[–] [email protected] 19 points 8 months ago
$ cat file1 > output_file
$ cat file2 >> output_file
$ cat file3 >> output_file

I'm sorry!

[–] [email protected] 4 points 8 months ago* (last edited 8 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