[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Help Processing a Log File
- Subject: [ale] Help Processing a Log File
- From: esoteric at 3times25.net (Geoffrey)
- Date: Wed May 12 21:43:57 2004
- In-reply-to: <1084411829.9103.102.camel@ibb-250>
- References: <1084406160.9097.93.camel@ibb-250> <[email protected]> <1084410323.9104.99.camel@ibb-250> <[email protected]> <1084411829.9103.102.camel@ibb-250>
Jonathan Glass wrote:
> Except that it only reads the last entry. The other 40000+ are being
> skipped. :(
If you do this?
#!/usr/bin/perl
use strict;
my ($user, $p1, $p2);
while (<ARGV>) {
/jobstart/ && ($user = substr((split(/\'/, $_))[3], 2));
/filestart/ && ($p1 = substr((split(/\'/, $_))[3], 2));
/fileend/ && ($p2 = substr((split(/\'/, $_))[7], 2))
&& print "$user ", $p2 - $p1, "\n";
};
--
Until later, Geoffrey Registered Linux User #108567
Building secure systems in spite of Microsoft