bash/tcsh 之 pipeline - Linux

Table of Contents

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


給大家參考!


--

All Comments

Tom avatarTom2015-02-10
推 但標題改成direct好像比pipeline切旨?
Hamiltion avatarHamiltion2015-02-13
re ?