shell专题——paste工具
paste用来合并文件行
语法格式
paste [选项] file1 file2 file3 …
选项
-s:串行处理(hang,一个文件占一行) 默认使并行(hang)处理
-d:自定义分隔符(默认为tab)
例子
file1
hello
world
file1
hello
morning
paste -s file1 file2
hello world
hello morning
paste -d: -s file1 file2
hello:world
hello:morning