Linux: Merging multiple files, each on a new line

后端 未结 5 396
予麋鹿
予麋鹿 2021-01-30 14:32

I am using cat *.txt to merge multiple txt files into one, but I need each file to be on a separate line.

What is the best way to merge files with each

5条回答
  •  猫巷女王i
    2021-01-30 15:03

    If you have a paste that supports it,

    paste --delimiter=\\n --serial *.txt
    

    does a really great job

提交回复
热议问题