in reply to Daily Log Audit (regex issue)
First, you need to decide how to start the processing:
I'd parse the log file line by line and use a hash to keep the necessary info for the jobs in progress:
$jobs{$partition}{jobname} $jobs{$partition}{starttime} $jobs{$partition}{endtime} $jobs{$partition}{rc}
You examine each line and determine:
Determine your strategy for what happens when you reach EOF:
The regexen used to parse each line should be fairly straight forward, you only have to read the file once, and you keep storage to a minimum. Would this be the most efficient way to do it? I don't know but as I said, during the coding process, you may gain some insight to try something different.
--Jim
|
---|