file1
1
2
3
4file2
5
6
7
8 结果我想要
1
5
2
6
3
7
4
8 选择哪一种file1与file2
不像
1
2
3
4
5
6
7
8我能像这样合并文件吗?
发布于 2020-05-30 20:30:24
作为@Michael建议的sed方法的替代,您还可以使用paste命令,在本例中是:paste -d \\n file1 file2
发布于 2020-05-30 20:08:18
您在linux命令行中尝试过下面的内容吗?
cat file2.txt >> file1.txt这将将file1中的文本附加到文件2。
编辑:看到您的查询所指的是相互缠绕文件,我认为本文将帮助您使用'sed‘命令:https://unix.stackexchange.com/questions/288521/with-the-linux-cat-command-how-do-i-show-only-certain-lines-by-number
https://stackoverflow.com/questions/62108021
复制相似问题