In KSH, I am pasting 2 almost identical files together and each one has a date and time on each line. I need to determine if the first instance of the date/time is greater than the 2nd instance of the date/time. If the first instance is greater, I just need to echo that line.
I thought I would need to change the dates/times to epoch seconds but I can't figure out how to do update every date/time in the files to epoch. I'm not even sure if this would be the best way. Below is a snip from the joined files:
AO | SYS.IO.LIB | 2011-09-20 11:35:15 AO | SYS.IO.LIB | 2011-09-20 11:35:15
AR | SYS.IO.LIB | 2011-09-21 12:02:16 AR | SYS.IO.LIB | 2011-09-21 12:02:16
AT | SYS.IO.LIB | 2011-09-24 17:30:17 AT | SYS.IO.LIB | 2011-09-22 19:30:17
AW | SYS.IO.LIB | 2011-09-22 11:14:19 AW | SYS.IO.LIB | 2011-09-20 11:35:19
AZ | SYS.IO.LIB | 2011-09-20 11:35:20 AZ | SYS.IO.LIB | 2011-09-20 11:35:20
BB | SYS.IO.LIB | 2011-09-20 11:35:24 BB | SYS.IO.LIB | 2011-09-20 11:35:24
BC | SYS.IO.LIB | 2011-09-28 05:58:26 BC | SYS.IO.LIB | 2011-09-20 11:35:26
BI | SYS.IO.LIB | 2011-09-30 21:20:27 BI | SYS.IO.LIB | 2011-09-20 11:35:27
BR | SYS.IO.LIB | 2011-09-11 02:10:29 BR | SYS.IO.LIB | 2011-09-20 11:35:29
BS | SYS.IO.LIB | 2011-09-20 11:35:30 BS | SYS.IO.LIB | 2011-09-20 11:35:30
CB | SYS.IO.LIB | 2011-09-13 10:48:32 CB | SYS.IO.LIB | 2011-09-20 11:35:32
CD | SYS.IO.LIB | 2011-09-20 11:35:36 CD | SYS.IO.LIB | 2011-09-20 11:35:36
CD080ID9 | SYS.IO.LIB | 2011-09-01 23:00:38 CD080ID9 | SYS.IO.LIB | 2011-09-20 11:35:38
CD082ID9 | SYS.IO.LIB | 2011-09-20 11:35:40 CD082ID9 | SYS.IO.LIB | 2011-09-20 11:35:40
CG | SYS.IO.LIB | 2011-09-20 11:35:44 CG | SYS.IO.LIB | 2011-09-20 11:35:44
CI | SYS.IO.LIB | 2011-09-20 11:35:45 CI | SYS.IO.LIB | 2011-09-20 11:35:45
Any assistance is greatly appreciated.