Re: Working with Log Files

2002-12-02 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Jenda Krynicky wrote: > > Let's write it as an ordinary program: > > > > #!perl -w > > use strict; > > > > sub CleanupLog { > > my ($from_file, $to_file) = @_; > > open my $IN, '< ' . $from_file > > Since you are using lexically scoped file han

Re: Working with Log Files

2002-12-01 Thread John W. Krahn
Jenda Krynicky wrote: > > From: "John W. Krahn" <[EMAIL PROTECTED]> > > > > perl > > -lane'eof||m!^\d{4}/\d\d/\d\d\s+\d\d:\d\d:\d\d\s!?((@X&&print"@X"),@X= > > @F):push@X,@F' logfiles* > > Wow :-) > > It's very short and all, but ... not very readable :-) > > Let's write it as an ordinary progr

Re: Working with Log Files

2002-12-01 Thread Jenda Krynicky
From: "John W. Krahn" <[EMAIL PROTECTED]> > Tim Martin wrote: > > > > My new manager wants me to learn perl and start with understanding > > logs files from 50 plus servers. I hope I have sent this message to > > the correct perl form. I have a sample of the logs below that need > > to be fixed us

Re: Working with Log Files

2002-12-01 Thread John W. Krahn
Tim Martin wrote: > > My new manager wants me to learn perl and start with understanding logs > files from 50 plus servers. > I hope I have sent this message to the correct perl form. > I have a sample of the logs below that need to be fixed using perl. > Any ideas or suggestion will be helpful. >

Working with Log Files

2002-11-30 Thread Tim Martin
My new manager wants me to learn perl and start with understanding logs files from 50 plus servers. I hope I have sent this message to the correct perl form. I have a sample of the logs below that need to be fixed using perl. Any ideas or suggestion will be helpful. = Start of log sam