2012-03-01 42 views

回答

6

使用tee

# This way you will see the output. 
ls /tmp | tee file1.txt file2.txt 

# With this line you won't. 
ls /tmp | tee file1.txt file2.txt >/dev/null 
3

您可以使用三通ls /tmp | tee -a a.txt b.txt

編輯:沒關係DarkDust戰爭快:)

1

除了其他建議的方法之外,您還可以在執行ls之後僅輸出輸出文件。

相關問題