有没有可能得到 $_. foreach管道中的变量?
例子:
$a = 1..9 $a | foreach {if ($_ -eq 5) { "show the line number of $_"}}
我希望你知道我的意思。
谢谢!
powershell foreach
foreach ×1
powershell ×1