考慮這個例子鏈:檢查標準輸出
cat foo.txt | grep -v foo | grep -v bar | grep -v baz
我想檢查標準輸出所述第二grep的以及所得到的標準輸出的內容:
cat foo.txt | grep -v foo | grep -v bar | UNKNOWN | grep -v baz
所以我需要一個工具,UNKNOWN,例如將stdout的內容轉儲到一個文件中,並沿着鏈傳遞stdout。
是否存在工具UNKNOWN(Windows和Linux的答案都是相關的)?
cat foo.txt | grep -v foo | grep -v bar | tee -a inspection.txt | grep -v baz – 2010-09-30 05:39:44