On Fri, 7 Jan 2005, Davide Libenzi wrote:
> On Fri, 7 Jan 2005, Mike Harrington wrote:
>
> > Okay I'm going crazy... why isn't the filesize listed in my SMPT logs?
>
> Here you go:
>
> ------------------------------------------------------------------
> #!/usr/bin/perl -w
>
> use strict;
>
>
> while (<>) {
> my @ar;
> my $size;
>
> chomp;
> @ar = split("\t", $_);
> ($size = $ar[11]) =~ s/^\"([^\"]+)\"$/$1/;
> if (int($size) > 0) {
> print $size . "\n";
> }
> }
>
> ------------------------------------------------------------------
>
> $ cat smtp-logfile | gensizes.pl >> sizes.txt
Or better:
$ cd logs
$ for f in smtp-* ; do cat $f | getsizes.pl >> sizes.txt; done
- Davide
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]