【发布时间】:2011-10-07 07:30:50
【问题描述】:
以此为例:
$var = "one","two","three"
0..2 | select-object $var[$_]
Index operation failed; the array index evaluated to null.
At line:1 char:27
+ 0..2 | select-object $var[ <<<< $_]
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArrayIndex
为什么 $_ 为空?
【问题讨论】:
标签: powershell pipe