hi all,
i have these server logs:
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
and i have this two "for" funcions in my script.
{count[$6]++}
for(j in count) printf "%-30s %-6d\n", j, count[j] ----> /counts number of specific errors in the sixth column/
NF>5&&!a[$6,$2]++{e[$6]++}
for (i in e) printf "%-30s %-6d\n", i, e----> /counts number of unique IPs in the second column associated in the error code in the sixth column/
Can i put these two "for" funcions in only one "for" function?
Thank you for you time!
Ervin
[/SIZE][/SIZE]