我想运行一个可执行文件并从文本文件中获取输入,然后在 Windows cmd 中写入输出

Yog*_*dra -1 c windows cmd io-redirection

在 ubuntu 中我会通过以下命令来完成

./a.out < input.txt | cat > ouput.txt
Run Code Online (Sandbox Code Playgroud)

我怎样才能在 Windows cmd 中执行此操作?

小智 5

你可以用两行来完成:

a.exe < input.txt >output.txt
type output.txt
Run Code Online (Sandbox Code Playgroud)