chraebsli@programming.dev to Programmer Humor@programming.dev · 9 months agoTouch a file in Linuxprogramming.devimagemessage-square94fedilinkarrow-up11.2Karrow-down131
arrow-up11.17Karrow-down1imageTouch a file in Linuxprogramming.devchraebsli@programming.dev to Programmer Humor@programming.dev · 9 months agomessage-square94fedilink
minus-squaremagic_lobster_party@kbin.runlinkfedilinkarrow-up21arrow-down1·9 months agoI 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.
minus-squarewewbull@feddit.uklinkfedilinkEnglisharrow-up18·9 months ago$ cat file1 > output_file $ cat file2 >> output_file $ cat file3 >> output_file I’m sorry!
minus-squaredan@upvote.aulinkfedilinkarrow-up4·edit-29 months agoThat’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
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.
$ cat file1 > output_file $ cat file2 >> output_file $ cat file3 >> output_file
I’m sorry!
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