I need to count occurrences in file text of a list ip.
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
8.8.8.8
1.1.1.1
1.1.1.1
1.1.1.1
1.1.1.1
I've tried:
Get-Content "C:\listip.txt" | Select-String -Pattern '^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$' | measure
But I received the total and not the sum of each occurrence. On linux I would have simply used uniq -c