我知道输出流STDOUT和STDERR。每当你打印到STDOUT时,在Unix shell中,你可以像这样重定向输出...
deviolog@home:~$ perl test_script.pl > output.txt
或者
deviolog@home:~$ perl test_script.pl 1> output.txt
当你打印到 STDERR 时,它看起来相同,但你切换到“通道”编号2:
deviolog@home:~$ perl test_script.pl 2> output.txt
我可以在output.txt中找到我之前作为错误输出打印的内容。
我的问题是,我是否可以以某种方式访问“通道”号码3? 是否有类似于...
print STDX "Hello World!\n";
...能够实现像下面这样的重定向吗?
deviolog@home:~$ perl test_script.pl 3> output.txt
附言:一个子问题是关于那些“通道”的术语 ^_^