作者newversion (呆大回鍋油)
看板Linux
標題[心得] bash/tcsh 之 pipeline
時間Mon Feb 9 04:05:54 2015
Shell: bash/tcsh
Output: stdout/stderr
target: file/console
總共有8種組合
stdout stderr
1 bash file.1 file.2
2 bash file.1 console
3 bash console file.2
4 bash console console
5 tcsh file.1 file.2
6 tcsh file.1 console
7 tcsh console file.2
8 tcsh console console
1. cmd > file.1 2> file.2
2. cmd > file.1
3. cmd 2> file.2
4. cmd
5. ( cmd > file.1 ) >& file.2
6. cmd > file.1
7. ( cmd >
/dev/stdin ) >& file.2
這個試了好久, /dev/stdout 一直試不出來,stdin就好了 XD
8. cmd
給大家參考!
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 140.112.251.86
※ 文章網址: https://www.ptt.cc/bbs/Linux/M.1423425957.A.FDB.html
推 KAOKAOKAO: 推 但標題改成direct好像比pipeline切旨? 02/09 23:19
推 KoenigseggG: re ? 02/09 23:48