Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Hi, can anyone help with a code snippet to read the sample log file below and generate the output to a log file as shown below based on date. It has to always grab the previous day data. For example if I run the script today it has to output yesterday's data.
sample log file
Test_log sample Data: ##################### SYNC STARTED: Mon Sep 26 03:10:05 ##################### receiving file list ... done .d..t.... HEFFILE0004/02720220R/METADATA/ .d..t.... HEFFILE0004/60530610R/METADATA/ .d..t.... HEFFILE0004/60530700R/METADATA/ .d..t.... HEFFILE0004/60531070R/METADATA/ .d..t.... HEFFILE0004/60910750R/METADATA/ ##################### SYNC FINISHED: Mon Sep 26 05:15:39 EDT 2011 ### +################## ##################### SYNC STARTED: Tues Sep 27 03:10:05 ##################### receiving file list ... done .d..t.... HEFFILE0004/02720220R/IMAGES/ .d..t.... HEFFILE0004/60530610R/METADATA/ ##################### SYNC FINISHED: Tues Sep 27 08:15:39 EDT 2011 ## +###################
Thanks,Required Output HEFFILE0004/02720220R HEFFILE0004/60530610R HEFFILE0004/60530700R HEFFILE0004/60531070R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reading a log file
by blue_cowdawg (Monsignor) on Sep 30, 2011 at 17:57 UTC | |
|
Re: Reading a log file
by choroba (Cardinal) on Sep 30, 2011 at 18:05 UTC |