当我使用-c
命令行参数和write-output "foo bar"
命令调用 powershell 时,单词会打印在单独的行上:
PS> powershell -c 'write-output "foo bar"'
foo
bar
当我执行以下行时,它会在同一行打印两个单词,这也是我对上述命令的预期:
powershell -c 'cmd /c echo foo bar'
foo bar
我不明白是什么让这个词印在不同的行上。
当我使用-c
命令行参数和write-output "foo bar"
命令调用 powershell 时,单词会打印在单独的行上:
PS> powershell -c 'write-output "foo bar"'
foo
bar
当我执行以下行时,它会在同一行打印两个单词,这也是我对上述命令的预期:
powershell -c 'cmd /c echo foo bar'
foo bar
我不明白是什么让这个词印在不同的行上。