Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在powershell中有一个排序的数字数组。
我需要一个 powershell 命令来删除该数组中小于特定值的所有元素。
例如:if array is [270 271 272 274] Value = 273
if array is [270 271 272 274]
Value = 273
结果数组应该是[274]
[274]
$arr = 270,271,272,274 $value = 273 $arr = $arr -gt $value $arr 274
PS>@(10,20,30,40) | where {$_ -gt 30} 40