15 呈現數據

15.1 理解輸入輸出ide

 在顯示器屏幕上顯示輸出
 將輸出重定向到文件中blog

15 呈現數據

1只重定向錯誤
la badfile 2> test1
2重定向錯誤和數據
la test1 badfile 2> test2 1> test3
la test1 badfile &> test2接口

腳本中重定向(若是追加使用>>):
echo "error" >&2input

exec 0< input
exec 1> output
exec 2> error.outputit

建立本身的重定向:
exec 3> test.out
echo "test" >&3class

建立讀寫文件符號(要當心,不容易使用)
exec 3<> testfiletest

關閉文件描述符:
exec 3>&-date

建立臨時文件/目錄:
mktemp test.XXXXXX
mktemp -d test.dir.XXXXXXfile

管道的T型接口:
date | tee outputim

相關文章
相關標籤/搜索