如何将标准输出写入 git bash 上的任何文件?

how can I write stdout to any file on git bash?

我试穿了 git bash Windows10

$ php show_argv.php 1000 > out.log

** show_argv.php 只是 print_r($argv[1]);

然后出现消息

stdout is not a tty

和 out.log 已创建,但内容为空。

我怎样才能写信给out.log??

请看看这是否也适合您。使用 C:\Program Files\Git\bin\bash.exe 而不是 C:\Program Files\Git\git-bash.exe 然后命令工作正常。