Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things

Re: Parsing a specific section of a log file

by sanPerl (Friar)
on Mar 01, 2007 at 06:05 UTC ( #602647=note: print w/replies, xml ) Need Help??

in reply to Parsing a specific section of a log file

I am just assuming few things before providing you my solution.
Assumption 1:You are running this script on Unix/Linux,
Assumption 2:The log file gets appended from bottom

Script can save the latest log file to some other directory after every run. Then script will run system 'diff' command to find out differences between latest log file and your saved log file (Which is the last version of log file). You will get entries, which are latest addition after last execution time of script. Work on those entries and use regex your way.
  • Comment on Re: Parsing a specific section of a log file

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://602647]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2018-06-19 03:24 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (111 votes). Check out past polls.