我一直在尝试在默认为 powershell 的 visual studio 终端中创建文件,并一直在使用 cat
和 echo
来创建新文件,但两者都显示消息:
cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:
echo
然后请求值:
InputObject[0]:
InputObject[1]:
etc.
鉴于 cat
要求:
Path[0]:
Path[1]:
etc.
这到底是什么意思?
最佳答案
cat
(获取内容)有一个强制参数 path
,这就是为什么它要求将路径放入您想要的文件,例如 猫
同样的原则适用于 echo
(写入输出),因为您告诉它 echo
nothing 它会提示您输入一些内容,因此它实际上可以运行命令有意的。
在 powershell 中 [Parameter(Mandatory=$true)]
是您可以用来进一步测试的内容
关于powershell - `cmdlet Write-Output at command pipeline position 1` 是什么意思?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65940433/