Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
621 views
in Technique[技术] by (71.8m points)

powershell - What does `cmdlet Write-Output at command pipeline position 1` mean?

I've been experimenting with creating files in the visual studio terminal which defaults to powershell and have been using cat and echo to create new files, but both bring up the message:

cmdlet Write-Output at command pipeline position 1
Supply values for the following parameters:

echo then requests values for:

InputObject[0]:
InputObject[1]:
etc.

Whereas cat asks for:

Path[0]:
Path[1]:
etc.

What does this actually mean?

question from:https://stackoverflow.com/questions/65940433/what-does-cmdlet-write-output-at-command-pipeline-position-1-mean

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

cat (Getting content) has a mandatory parameter of path which is why it is asking for to put the path to what file for example you would like to cat

Same principle applies to echo (writing output) as you're telling it to echo nothing it will prompt you for some input so it can actually run the command as intended.

In powershell [Parameter(Mandatory=$true)] Is what you can use yourself to test this out further


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...