在 Windows PowerShell 上重定向标准输入/输出所需的语法是什么?
在 Unix 上,我们使用:
$./program <input.txt >output.txt
如何在 PowerShell 中执行相同的任务?
最佳答案
您无法将文件直接挂接到标准输入,但您仍然可以访问标准输入。
Get-Content input.txt | ./program > output.txt
关于powershell - 在 Windows PowerShell 中重定向标准输入\输出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11447598/