从PowerShell的数组中删除重复值 [英] Removing duplicate values from a PowerShell array
本文介绍了从PowerShell的数组中删除重复值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我如何从一个PowerShell数组删除重复?
$ a = @(1,2,3,4,5,5,6,7,8,9,0,0)
解决方案
使用选择-uniq
例如:
$ a = @(1,2,3,4,5,5,6,7,8,9,0,0)
$ a = $ A |选择-uniq
How can I remove duplicates from a PowerShell array?
$a = @(1,2,3,4,5,5,6,7,8,9,0,0)
解决方案
Use Select -uniq
e.g.:
$a = @(1,2,3,4,5,5,6,7,8,9,0,0)
$a = $a | select -uniq
这篇关于从PowerShell的数组中删除重复值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文