shell专题——paste工具

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

发布了127 篇原创文章 · 获赞 68 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/LiuRenyou/article/details/103699035
今日推荐