Re: Missing sequence finder for logfiles

2004-04-18 Thread John W. Krahn
Sten Berg wrote: > > Another try > > Here is the logfile I tested on (I´ve marked were the loops starts): > LOGFILE > - > UNNUMBERED INFO > -- > #loop1: > Meas.Res. Nr > - value : 248 (fch) > Meas.Res. Nr > - value : 249 (fdh) > Meas.Res. Nr > - value : 250 (feh) > Mea

RE: Missing sequence finder for logfiles

2004-04-16 Thread Charles K. Clarkson
Sten Berg <[EMAIL PROTECTED]> wrote: : It looks like this (just trying to be helpful ;-): Sorry, didn't mean to be so grumpy. I wrote one solution and then re-read the post and had to re-write because I hadn't caught the extra lines. In this solution I first change the file into an

RE: Missing sequence finder for logfiles

2004-04-16 Thread Sten Berg
... From: "Charles K. Clarkson" <[EMAIL PROTECTED]> To: "'Sten Berg'" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> Subject: RE: Missing sequence finder for logfiles Date: Fri, 16 Apr 2004 10:04:01 -0500 Sten Berg <[EMAIL PROTECT

RE: Missing sequence finder for logfiles

2004-04-16 Thread Charles K. Clarkson
Sten Berg <[EMAIL PROTECTED]> wrote: : : Another try : : Here is the logfile I tested on (I´ve marked were the loops starts): So is "#loop1:" in there or not in there? What about the dashes? Show just what is in the file. Don't add anything. : LOGFILE : - : UNNUMBERED

Re: Missing sequence finder for logfiles

2004-04-16 Thread James Edward Gray II
On Apr 16, 2004, at 3:48 AM, Sten Berg wrote: Hi John (and others)! So far, I have this code (with good help from Venu :-), and it works: my $file = shift; open (TEST, "$file"); Don't do this. First, there is no need to quote a variable that contains a string. Second, we always need to verify

Re: Missing sequence finder for logfiles

2004-04-16 Thread Sten Berg
the 3rd and "5" to "255" in the 3rd loop... /eplabi From: "Sten Berg" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Missing sequence finder for logfiles Date: Fri, 16 Apr 2004 11:04:40 +0200 Sorry John, I realised you

Re: Missing sequence finder for logfiles

2004-04-16 Thread Sten Berg
Sorry John, I realised you ment that your code take care of the lot. Anyway, I still do get it to work. Execution hangs at the prompt... /eplabi From: "Sten Berg" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED], [EMAIL PROTECTED] Subject: Re: Missing sequence finder for logfiles Date:

Re: Missing sequence finder for logfiles

2004-04-16 Thread Sten Berg
check)? Does it take care of the special case when/if value 0 is missing? regards eplabi From: "John W. Krahn" <[EMAIL PROTECTED]> To: [EMAIL PROTECTED] Subject: Re: Missing sequence finder for logfiles Date: Fri, 16 Apr 2004 00:07:33 -0700 Sten Berg wrote: > > Hi gurus!

Re: Missing sequence finder for logfiles

2004-04-16 Thread John W. Krahn
Sten Berg wrote: > > Hi gurus! Hello, > I´m looking for a way of analysing a log file and pinpoint missing sequences > (foreach loop?). The logfiles looks something like this: > > LOGFILE > - value : 0 > some data... > - value : 1 > some data... > - value : 2 > some data... > ... > ... > - valu

Re: Missing sequence finder for logfiles

2004-04-15 Thread James Edward Gray II
On Apr 15, 2004, at 8:31 AM, Sten Berg wrote: Sorry! This is what I´ve come up with so far: my $nr=0; my @missing; open (FILE, ") { ($firstbit, $value)=split /:/,$_; $value=trim ($value); if ($firstbit eq "- value ") { if ($nr==256) { $nr=0; print "New Sequence Started\n";

RE: Missing sequence finder for logfiles

2004-04-15 Thread Sten Berg
gpoint for each loop and what happens if it is missing?... eplabi From: "Venugopal P" <[EMAIL PROTECTED]> To: "Sten Berg" <[EMAIL PROTECTED]>,<[EMAIL PROTECTED]> CC: <[EMAIL PROTECTED]> Subject: RE: Missing sequence finder for logfiles Date: Thu, 15

RE: Missing sequence finder for logfiles

2004-04-15 Thread Venugopal P
PROTECTED] Subject: Re: Missing sequence finder for logfiles Sorry! This is what I´ve come up with so far: my $nr=0; my @missing; open (FILE, ") { ($firstbit, $value)=split /:/,$_; $value=trim ($value); if ($firstbit eq "- value ") { if ($nr==256) { $nr=0;

Re: Missing sequence finder for logfiles

2004-04-15 Thread Sten Berg
s Edward Gray II <[EMAIL PROTECTED]> To: "Sten Berg" <[EMAIL PROTECTED]> CC: [EMAIL PROTECTED] Subject: Re: Missing sequence finder for logfiles Date: Thu, 15 Apr 2004 07:54:29 -0500 On Apr 15, 2004, at 7:08 AM, Sten Berg wrote: Hi gurus! I´m looking for a way of analysing a

Re: Missing sequence finder for logfiles

2004-04-15 Thread James Edward Gray II
On Apr 15, 2004, at 7:08 AM, Sten Berg wrote: Hi gurus! I´m looking for a way of analysing a log file and pinpoint missing sequences (foreach loop?). The logfiles looks something like this: LOGFILE - value : 0 some data... - value : 1 some data... - value : 2 some data... ... ... - value : 255

Missing sequence finder for logfiles

2004-04-15 Thread Sten Berg
Hi gurus! I´m looking for a way of analysing a log file and pinpoint missing sequences (foreach loop?). The logfiles looks something like this: LOGFILE - value : 0 some data... - value : 1 some data... - value : 2 some data... ... ... - value : 255 some data... - value : 0 some data... - value :