paste

基本语法
paste [option]... [file]...
选项说明
-d 指定拼接后分隔符(默认制表符“tab”)
-s 生成的行数为文件数目
直接连接

$ paste name.txt address.txt

自定义分隔符

$ paste -d: students.txt phones.txt

$ paste -d"	" students.txt phones.txt 

把文件变成一行后追加

paste -s -d"	" students.txt phones.txt  | wc -l
2
一切代码都是为了生活,一切生活都是调剂
原文地址:https://www.cnblogs.com/argor/p/7918866.html