paste [文件名1 [文件名2] ……] [选项]
-s 把文件以行的方式拼接
-d 制定分隔符,默认以制表符分隔
[[email protected] ~]# seq 5 >1.txt [[email protected] ~]# seq 6 10 >2.txt [[email protected] ~]# seq 11 15 >3.txt [[email protected] ~]# paste 1.txt 2.txt 3.txt 1 6 11 2 7 12 3 8 13 4 9 14 5 10 15 [[email protected] ~]# paste -d ‘,‘ 1.txt 2.txt 3.txt 1,6,11 2,7,12 3,8,13 4,9,14 5,10,15 [[email protected] ~]# paste -d ‘,‘ -s 1.txt 2.txt 3.txt 1,2,3,4,5 6,7,8,9,10 11,12,13,14,15
时间: 2024-10-31 09:29:31