Powershell: Accessing the pipelined object
I am baffled a little, I can't figure this out.
I have the following code, it just replaces the character at the 2nd place with nothing.
$list -replace $list[1],""
this isn't special.
However, I would like to know how to pass $list
via pipeline and access it.
something like this:Command-With-String-Output | replace-some-how pipvar[1],""
Thanks.
Thanks @SimonS
$list = "abcde"
$list | %{$_ -replace $_[1],"" }
acde