001、方法1
[root@pc1 test01]# ls a.txt b.txt [root@pc1 test01]# cat a.txt 1 2 3 4 5 6 [root@pc1 test01]# cat b.txt a b c d e f [root@pc1 test01]# paste -d "_" a.txt b.txt 1 2_a b 3 4_c d 5 6_e f [root@pc1 test01]# paste -d "_" a.txt b.txt | tr "_" "\n" 1 2 a b 3 4 c d 5 6 e f
002、方法2
[root@pc1 test01]# ls a.txt b.txt [root@pc1 test01]# cat a.txt 1 2 3 4 5 6 [root@pc1 test01]# cat b.txt a b c d e f [root@pc1 test01]# paste -d "\n" a.txt b.txt ## 直接使用换行符作为合并后的分割符 1 2 a b 3 4 c d 5 6 e f
原文:https://www.cnblogs.com/chenwenyan/p/9634463.html
标签:test01,交叉,paste,pc1,合并,cat,linux,txt,root From: https://www.cnblogs.com/liujiaxin2018/p/17700383.html