in reply to Re^2: trouble parsing log file...
in thread trouble parsing log file...
You read the file one line at a time looking for either DOWN or PROBLEM. When one of these tests work, you set the button response accordingly and use last to leave the while loop and do something with the outcome.
You may only be reading 5Mb of files but this translates into a much larger use of memory. It also involves the computer reading the file line by line anyway as it puts it into memory. If your match is on line 20 of a 2000 line file, your script only needs to read 20 lines and you are done.
If you continue to have trouble, post your code in the replies.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: trouble parsing log file...
by perl_geoff (Acolyte) on Nov 20, 2006 at 21:01 UTC | |
by inman (Curate) on Nov 20, 2006 at 21:18 UTC |