Hello
ajju,
I have a few to questions pose in response first:-
- What have you tried so far?
- What output/errors do you get?
- What OS version are you using?
- What are your preferred tools? (C, shell, perl, awk, etc.)
- What logical process have you considered? (to help steer us to follow what you are trying to achieve)
- Are the sections without a Finished and Result record to be considered as failures or are they considered as running?
- Is the format always the same?
Most importantly,
What have you tried so far?
There are probably many ways to achieve most tasks, so giving us an idea of your style and thoughts will help us guide you to an answer most suitable to you so you can adjust it to suit your needs in future.
We're all here to learn and getting the relevant information will help us all.
From
Quote:
date is in windows format
I would say that this is US format, but then that may not be correct either. Importantly, it appears that it is
m/d/yyyy h:mi:ss AP so there is still a question of if there is a leading zero on the day. It would affect the options for the
date command to work out the search string. Have a look at the manual page for
datefor the options such as
%d to see why it is important.
Have a look at the manual page for
grep. As you are AIX, the
-p flag may be of interest.
You will need to check what time of day you will be running this too, else you may actually need to look for the previous day's records and then you have to consider a calculation which AIX may not have built in to the
date command in your version.
Regards,
Robin