|
We still don’t know what the data
looks like, so you’ll have to extrapolate a lot. #use GetOpts::Long to get command line
options #use file globbing to get the list of
files to operate on foreach $file (@files) { open(IN,”<$file”)
or die; while(<IN>) { chomp; #to remove
the line termination #do something to
get the data from a line of text into a set of variables and store them in an
array #use variables or
a hash to store totals or aggregations } close IN; } # print your results There’s a sample script that reads
Exchange tracking logs (logs are logs) at http://www.swinc.com/resources/scripts.asp
if you want to start from there. There are also tools like Sawmill that
might do all this for you without you having to write much code. From: Erik Gray
[mailto:[EMAIL PROTECTED] I want to eliminate garbage that I do not need like using grep on a log
file. If I am just searching for certain IP address, my output will just that
entry of the log file. I am doing this as an experiment currently. I would like
to get a handle on this so I can take this to work and enhance the performance
monitoring of our network. |
_______________________________________________ Perl-Win32-Admin mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
