作者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://webptt.com/cn.aspx?n=bbs/Linux/M.1423425957.A.FDB.html
1F:推 KAOKAOKAO: 推 但标题改成direct好像比pipeline切旨? 02/09 23:19
2F:推 KoenigseggG: re ? 02/09 23:48