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