Link to home
Start Free TrialLog in
Avatar of dpk_wal
dpk_walFlag for India

asked on

extract data from text file

Hi,

I have a large text file from which I need to extract lines as below:
time-range 02293404
 absolute end 23:59 19 September 2009
time-range 10May2010_SR405807
 absolute end 23:59 10 May 2010
time-range 11july2010
 absolute end 23:59 11 July 2010


The final output would be:
scheduler <name> start-date YYYY-MM-DD.HH:MM stop-date YYYY-MM-DD.HH:MM

For start-data we can use static date as: 2009-01-01.00:00
Stop-date would be the end date above.

Eg,
scheduler A start-date 2009-01-01.00:00 stop-date 2009-09-10.23:59
scheduler B start-date 2009-01-01.00:00 stop-date 2010-10-19.23:59
scheduler C start-date 2009-01-01.00:00 stop-date 2010-11-11.23:59

Thanks for all the help in advance.
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Where do you get scheduler names from?  Your sample text file lines don't appear to include the info.
Avatar of dpk_wal

ASKER

Sorry for the typo:
>> time-range 02293404
the word after time-range is the scheduler name; in original post the names are 02293404, 10May2010_SR405807, 11july2010.

Regards.
ASKER CERTIFIED SOLUTION
Avatar of sjklein42
sjklein42
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of dpk_wal

ASKER

Thank you!