#tee -[ai] FILE...
描述
将输出同时输出到文件和标准输出
选项和参数
-a 追加到文件
-i 忽略中止信号(Ctrl-C)
root@localhost:~/shell# touch test
root@localhost:~/shell# cat test
root@localhost:~/shell# cat file | tee -a test
Massachusetts
Virginia
Tulsa
Falls
Massachusetts
root@localhost:~/shell# paste file test
Massachusetts Massachusetts
Virginia Virginia
Tulsa Tulsa
Falls Falls
Massachusetts Massachusetts
#paste -[ds] FILE ...
描述
将多个文件打印在标准输出
选项和参数
-d 指定分隔符
-s 多个文件的打印完一个文件的内容再打印下一个的
root@localhost:~/shell# paste -d ‘=‘ file test
Massachusetts=Massachusetts
Virginia=Virginia
Tulsa=Tulsa
Falls=Falls
Massachusetts=Massachusetts
Virginia=Virginia
View=View
Massachusetts=Massachusetts
view=view
root@localhost:~/shell# paste -s file test
Massachusetts Virginia Tulsa Falls Massachusetts Virginia View Massachusetts view
Massachusetts Virginia Tulsa Falls Massachusetts Virginia View Massachusetts view
原文地址:http://poollooq.blog.51cto.com/8663272/1649695