[英]How can I redirect output in Bash
I work with program which usage is "program input-file output-file". 我使用的程序是“程序输入文件输出文件”。 How can I write the result in STDOUT and don't write it into the output-file.
如何在STDOUT中写入结果,而不将其写入输出文件。 Thanks.
谢谢。
将/dev/stdout
用作输出文件名。
Use /dev/fd/1
or /dev/stdout
as the output file. 使用
/dev/fd/1
或/dev/stdout
作为输出文件。 Some programs will recognize -
to mean stdout
, or will even use it automatically if the output file is omitted, but this is up to the individual program (unlike the /dev
ones which are system services, although sometimes emulated by shells on systems that lack them). 有些程序会识别
-
表示stdout
,或者,如果省略了输出文件,甚至会自动使用它,但这取决于单个程序(与/dev
的系统服务不同),尽管有时由缺少系统的shell来模拟他们)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.