bash/tcsh 之 pipeline - Linux

By Jake
at 2015-02-09T04:05
at 2015-02-09T04:05
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
給大家參考!
--
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
給大家參考!
--
Tags:
Linux
All Comments

By Tom
at 2015-02-10T14:58
at 2015-02-10T14:58

By Hamiltion
at 2015-02-13T22:11
at 2015-02-13T22:11
Related Posts
Mail Server 架設問題

By Belly
at 2015-02-08T13:50
at 2015-02-08T13:50
curl或wget 只抓 N bytes的問題

By Hedy
at 2015-02-08T01:15
at 2015-02-08T01:15
ubuntu 14.04架設pdc

By Iris
at 2015-02-07T12:07
at 2015-02-07T12:07
Linux出現重大「鬼」漏洞!

By Jack
at 2015-02-06T20:52
at 2015-02-06T20:52
Sed改名字

By Steve
at 2015-02-06T18:11
at 2015-02-06T18:11