Kenzo wrote:
> I run this script daily to see how many viruses where stopped the day
> before.
> #!/bin/sh
>
> zgrep -i "infected" /var/log/maillog.0.gz | awk '{print $8}' | \sort -f |
> uniq -ic | sort -rfn | \
> uuencode virus_report | \
> mail -s "virus_daily_report" [EMAIL PROTECTED]
>
>
> The output comes out similar to this.
> 6 something.a
> 3 something.b
>
> I want to be able to total the results so that it appears like this.
>
> 6 something.a
> 3 something.b
> 9 total
>
> what do I need to add to the script?
Not a direct answer, but what I usually do is modify Craig Sanders'
spam-stats.pl script to grep for what I need since it does a nice listing,
sorted descending, and with a total.
If you want an example that would work for what you're doing, let me know.
--
Chris Scott
Host Orlando, Inc
http://www.hostorlando.com/