参见英文答案 >
Linux/Perl: Additional output buffers other than STDOUT and STDERR? 1个
我知道输出流STDOUT和STDERR.每当你打印到STDOUT时,在unix shell中你可以像这样重定向输出……
我知道输出流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
附:一个子问题将是那些“渠道”^ _ ^的术语