How do I append lines from one file to the end of each line of another file?

前端 未结 1 1482
北恋
北恋 2021-01-13 07:54

Suppose I have two files:

cat
dog
baboon
feline
canine
primate

I want to append the lines from one file at the end of another file after

相关标签:
1条回答
  • 2021-01-13 08:28
    paste --delimiter=' ' file1 file2
    

    Note: the result will be written to stdout. If you want to store the result in a file, use a redirection operator:

    paste --delimiter=' ' file1 file2 > outputfile
    

    Run man paste for more information about the command.

    0 讨论(0)
提交回复
热议问题