awk count how many IP have received that error

Hi all,

I want to write a awk script that counts unique IPs that have received one special error.
For example

25-04-2012;192.168.70.31;1254545454545417;500.0;SUCCESS
25-04-2012;192.168.70.32;355666650914;315126423993;;General_ERROR_23
30-04-2012;192.168.70.33;e;null;null;Failure
30-04-2012;192.168.70.33;e;null;null;Failure
30-04-2012;192.168.70.33;e;null;null;Failure
30-04-2012;192.168.70.33;e;null;null;Failure
30-04-2012;192.168.70.33;e;null;null;Failure
30-04-201;192.168.70.34;e;null;null;ERROR_22
30-04-2012;192.168.70.37;e;null;null;Failure.
30-04-2012;192.168.70.10;e;null;null;Failure

The result should be:

Error name              Number of unique IPs

General_ERROR_23 =     1
Failure  = 3
ERROR_22  =  1  

etc...

Thank you very much!

Ervin

will the input actually have "Failure" and "Failure." and you need that folded together in the script, or was a typo in example?

[mute@geek ~]$ ./script input
Failure = 3
General_ERROR_23 = 1
ERROR_22 = 1
[mute@geek ~]$ cat script
#!/usr/bin/awk -f
BEGIN { FS=";" }
NF>5&&!a[$6,$2]++{e[$6]++}
END{for (i in e) print i " = " e}

That was exactly what i needed!!!

THANK YOU SO MUCH!!

Bumping up posts or double posting is not permitted in these forums.

Please read the rules, which you agreed to when you registered, if you have not already done so.

You may receive an infraction for this. If so, don't worry, just try to follow the rules more carefully. The infraction will expire in the near future

Thank You.

The UNIX and Linux Forums.

Will keep this thread open. (Another Moderator was closing the other thread simultaneously).

Link to other thread, since some interesting ideas -->
http://www.unix.com/shell-programming-scripting/184929-awk-count-how-many-unique-ips-have-received-error.html\#post302633733