二.tee
(a)sunOS /user/bin
(b)-lc.1 => /usr/lib/libc.so.1.9
-ldl.1 => /usr/lib/libdl.so.1.0
(c)將輸入的訊息(eg字串)讀入,寫進輸出信息(eg螢幕顯示)和檔案裡,
若無此檔案,則建立一個新檔;若有,則複寫.
(d)指令格式 tee [-a] [-i] [--append] [--ignore-interrupts] [--help] [--version]
[檔案名稱]
a. -a,-append 不要複寫檔案,直接附加在後面
b. -i, --ignore-interrupts 不理會中斷訊息
C. -help 顯示出相關輔助說明,並跳出
d. -version 顯示指令版本
(e)下一指令 tee test.txt (enter)
this is "tee" program test~~~~ (enter)
this is "tee" program test~~~~
test done (enter)
test done發現新增一test.txt檔,打開,可看到內容如下
this is "tee" program test~~~~
test done再下一指令 tee -a test.txt
this is the "append" test (enter)
this is the "append" test再打開test.txt, 內容變為
this is "tee" program test~~~~
test done this is the "append" test (新增了這一行)