[ back to toc ]

A script that would search a text file

Date: 2002/01/25 19:52

Q:
Hello,

I get a text file which is a daily report from our mail server.
Basically, it's our virus encounter report.

This report appears in this format:

Date:
Method: <Always SMTP>
From:
File:
Action: <either deleted or repaired>
Virus:

The report simply lists every instance, without any type of summary. We
receive literally hundreds of viruses per day.

I've been trying to write a script that would:

A.) List the number of viruses listed in the report

B.) List each type of virus in the report, with the number of times they
appear. (What percent of the total number of viruses a certain type of
virus would also be helpful, but that could be easily determined by hand,
and isn't as necessary).

C.) Similar statistics for senders and recipients.

As I'm a very new perl scripter, I'm very lost on where to begin. Any
help or examples would be appreciated.

A:
If Perl is too compilcated for you, then use BASIC from www.scriptbasi.com

Regards,
Peter

[ back to toc ]