[ale] Help Processing a Log File
Jonathan Glass
jonathan.glass at ibb.gatech.edu
Wed May 12 21:46:21 EDT 2004
That's it. i'm going home! Dude! Such a simple fix.
Let me know when you're in downtown (around 5th & spring) and I'll buy
you a drink (beer, coke, tea, etc).
Thanks!
Jonathan
On Wed, 2004-05-12 at 21:42, Geoffrey wrote:
> 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";
> };
--
Jonathan Glass
Systems Support Specialist II
Institute for Bioengineering & Bioscience
Georgia Institute of Technology
Email: jonathan.glass at ibb.gatech.edu
Office: 404-385-0127
Fax: 404-894-2291
More information about the Ale
mailing list