Re: counting ip addresses



rogv24@xxxxxxxxx wrote:

I am trying to write a routine to provide counts from a list of IP
addresses that are sorted.

example:

2.3.4.5
2.3.4.5
2.3.4.5
10.20.20.40
10.20.20.40

report would like this 2.3.4.5 - sum 3
10.20.20.40 - sum 2


I would suggest you take a look at the uniq command,
and especially to its -c flag.

Eric
.