Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用的程序是“程序输入文件输出文件”。如何将结果写入 STDOUT 而不将其写入输出文件。谢谢。
把/dev/stdout作为输出文件名。
/dev/stdout
使用/dev/fd/1or/dev/stdout作为输出文件。如果输出文件被省略,一些程序会识别-到 mean stdout,甚至会自动使用它,但这取决于单个程序(与/dev系统服务不同,尽管有时在缺少它们的系统上由 shell 模拟)。
/dev/fd/1
-
stdout
/dev