Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
文件 1:
dsf sdfsd dsfsdf
文件 2:
sdfsdfsd sdfsdsdfsdf dsfsdfsdfsdf
我想水平分类两个文件,所以结果是:
dsf sdfsdfsd sdfsd sdfsdsdfsdf dsfsdf dsfsdfsdfsdf
谢谢
您可以将paste命令用作:
paste
paste file1 file2
演示:
$ cat file1 1 2 3 $ cat file2 3 4 5 $ paste file1 file2 1 3 2 4 3 5 $
用作分隔符的默认字符是制表符。如果您想要其他字符说空格,您可以使用该-d选项:
-d
paste -d ' ' file1 file2