开发者

cmd.exe equivalent of /dev/stdout, to write to stdout 'as a file'

开发者 https://www.devze.com 2023-04-02 14:53 出处:网络
I have a batch file that calls a Windows GUI application. The GUI app writes it\'s output (the interesting bits anyway) to it\'s own GUI display rather than stdout, however I would like it displayed i

I have a batch file that calls a Windows GUI application. The GUI app writes it's output (the interesting bits anyway) to it's own GUI display rather than stdout, however I would like it displayed in the cmd window where the batch file is running.

Thankfully the app has an option to write the output to a file, so I need to redirect t开发者_开发知识库his to stdout. In *nix I would give /dev/stdout as the file to write to but what about in Windows/cmd?


It seems that Windows has no equivalent to unix /dev/stdout.

Take a look at this thread: https://superuser.com/questions/241272/windows-how-to-redirect-file-parameter-to-stdout-windows-equivalent-of-dev-st


con is the equivalent of /dev/stdout and /dev/stderr in Windows. But I am not sure how you are writing the output. It will help if you could paste the block that writes to the file.

0

精彩评论

暂无评论...
验证码 换一张
取 消