【发布时间】:2017-06-05 02:49:13
【问题描述】:
我发现下面的文章可以帮助我对 IP 地址列表进行分组。
Using Powershell, how can i count the occurrence of each element in an array?
我目前使用的命令是:
get-content c:\temp\temp3.txt | group
这将得到以下输出:
> Count Name Group
----- ---- -----
3 192.168.1.1 {192.168.1.1, 192.168.1.1, 192.168.1.1}
3 192.168.1.2 {192.168.1.2, 192.168.1.2, 192.168.1.2}
我可以使用什么命令来查找所有超过 5 个 IP 的 IP?
我想我需要将我的原始命令作为如下变量:
$groupedoutput get-content c:\temp\temp3.txt | group
不确定从那里去哪里。任何帮助将不胜感激。
谢谢,
S
【问题讨论】:
标签: powershell output