argor

   :: 首页  :: 新随笔  :: 联系 ::  :: 管理

 

基本语法
paste [option]... [file]...

 

选项说明
-d 指定拼接后分隔符(默认制表符“tab”)
-s 生成的行数为文件数目

 

直接连接

$ paste name.txt address.txt

自定义分隔符

$ paste -d: students.txt phones.txt

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

把文件变成一行后追加

paste -s -d"\t" students.txt phones.txt  | wc -l
2

 

posted on 2017-11-29 10:20  argor  阅读(121)  评论(0编辑  收藏  举报