minixman has asked for the wisdom of the Perl Monks concerning the following question:
my $get = "Starting"; open(FH, "$pd_zvkk") || die ("Unable to open pd_zvkk log file: $pd_ +zvkk : !$ \n"); printf STDERR ("My get = $get \n"); foreach (<FH>) { #printf STDERR if /$get/; chomp(); unless($_ !~ /$get/) { printf STDERR ("String = $_ \n"); } }
So it is printout out more data than required, can't seem to tell it when you find the result stop and parse it.[Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] My get = St +arting [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = Fr +i Aug 26 05:56:01 BST 2005 INFO: PD/ZVKK Load: Starting. [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] My get = [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = Fr +i Aug 26 05:56:01 BST 2005 INFO: PD/ZVKK Load: Starting. [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = Fr +i Aug 26 05:56:01 BST 2005 INFO: PD/ZVKK Load: Removing old clientac +c files. [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = Fr +i Aug 26 05:56:01 BST 2005 INFO: PD/ZVKK Load: Running the stored pr +oc. [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = [Mon Nov 14 09:54:54 2005] [error] [client 10.142.204.242] String = PL +/SQL procedure successfully completed.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: regex log file too many results
by tirwhan (Abbot) on Nov 14, 2005 at 10:21 UTC | |
by minixman (Beadle) on Nov 14, 2005 at 10:41 UTC | |
by tirwhan (Abbot) on Nov 14, 2005 at 10:52 UTC | |
|
Re: regex log file too many results
by Aristotle (Chancellor) on Nov 14, 2005 at 10:46 UTC | |
|
Re: regex log file too many results
by Moron (Curate) on Nov 14, 2005 at 10:55 UTC | |
by minixman (Beadle) on Nov 14, 2005 at 11:15 UTC | |
|
Re: regex log file too many results
by GrandFather (Saint) on Nov 14, 2005 at 10:45 UTC | |
|
Re: regex log file too many results
by Cody Pendant (Prior) on Nov 14, 2005 at 10:51 UTC |