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?

Thanks.

Reply via email to