grep INFECTED virMMDD.log | gawk "{print $8}" | sort | uniq -ic | sort
/reverse

Gives a nice listing of catches:

     50 HTML/[EMAIL PROTECTED]:
     33 W32/[EMAIL PROTECTED]:
     19 'CR'
     18 W32/[EMAIL PROTECTED]:
      3 W32/[EMAIL PROTECTED]:
      2 Encoding
      1 W32/Wurmark.A:
      1 W32/[EMAIL PROTECTED]:
      1 W32/[EMAIL PROTECTED]:
      1 W32/[EMAIL PROTECTED]:
      1 W32/[EMAIL PROTECTED]:
      1 W32/[EMAIL PROTECTED]:
      1 'Space
      1 'MIME
      1 'Blank


John Dobbin

> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Nick
> Sent: Wednesday, December 01, 2004 4:31 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [Declude.Virus] log file grepping
> 
> Bill?.. or anyone  :)
> 
> Is there a way in a single line to use grep or a similar tool 
> on a virus log file and have it return 2 values: 
> total_scanned and viruses found?
> 
> I have been able to do this in multiple lines with temp files 
> but am stuck trying to do it on a single command line.
> 
> The purpose here is to use mrtg to graph virus traffic - I 
> can do it with one value but when I try to combine both I am lost.
> 
> Thanks in advance - 
> 
> -Nick
> 
> ---
> [This E-mail was scanned for viruses by Declude Virus 
> (http://www.declude.com)]
> 
> ---
> This E-mail came from the Declude.Virus mailing list.  To 
> unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
> type "unsubscribe Declude.Virus".    The archives can be found
> at http://www.mail-archive.com.
> 

---
[This E-mail was scanned for viruses by Declude Virus (http://www.declude.com)]

---
This E-mail came from the Declude.Virus mailing list.  To
unsubscribe, just send an E-mail to [EMAIL PROTECTED], and
type "unsubscribe Declude.Virus".    The archives can be found
at http://www.mail-archive.com.

Reply via email to