I have a (daily) error file that looks like this:
04/28/05 10:11:07|adt_in|CL71234567|PATIENT '1234567' ALREADY DISCHARGED
Often, due to automatic processes that are running at midnight, I have thousands of these lines to look through for valid errors.
What I need is a quick ksh routine to allow me to pull, from this (date/time) sorted list, any line which has a time stamp (10:11:07 above) that is outside of the 0001-0010 time frame.
I've tried one suggestion from the Unix scripting forum - filtering with the line
but the field I need to check is field 1, not two and I can't figure out how to just look at the time portion of the first field and not the whole thing.
Comments greatly appreciated.
Tnx.
Tom
"My mind is like a steel whatchamacallit ...
04/28/05 10:11:07|adt_in|CL71234567|PATIENT '1234567' ALREADY DISCHARGED
Often, due to automatic processes that are running at midnight, I have thousands of these lines to look through for valid errors.
What I need is a quick ksh routine to allow me to pull, from this (date/time) sorted list, any line which has a time stamp (10:11:07 above) that is outside of the 0001-0010 time frame.
I've tried one suggestion from the Unix scripting forum - filtering with the line
Code:
awk '$2 > "00:00:10"' infile > outfile
but the field I need to check is field 1, not two and I can't figure out how to just look at the time portion of the first field and not the whole thing.
Comments greatly appreciated.
Tnx.
Tom
"My mind is like a steel whatchamacallit ...