To find the time difference between two lines of the same log file

Hello Friends,

I want to write a script for the following:

nlscux62:tibprod> grep "2008 Apr 30 01:" SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2.log | grep -i post | more
2008 Apr 30 01:01:23:928 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000095 IDOC posted to
client SA_EHV_SPEED_SFC_IN_03InboundConnection4Client0 successfully tracking=#QrQ--5--G/SbkkvU67u6Ucw38-6gQ#
2008 Apr 30 01:01:23:958 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000094 Posting IDOC t
o client SA_EHV_SPEED_SFC_IN_03InboundConnection8Client0 tracking=#I0Y--/--G/Sbl-rs68EEcJI5X-mrY#
2008 Apr 30 01:01:24:788 GMT +2 SAPAdapter.SA_EHV_SPEED_SFC_IN_03-SA_EHV_SPEED_SFC_IN_03-2 Info [Adapter] AER3-000095 IDOC posted to
client SA_EHV_SPEED_SFC_IN_03InboundConnection8Client0 successfully tracking=#I0Y--/--G/Sbl-rs68EEcJI5X-mrY#

On using the above command I can view the time difference between posting and posted. I want that the UNIX program to check for the time difference greater than 1 second. Please help me in this. I am absolutely new to the UNIX environment and know little regarding Shell programming. Hence I would like to have the full code.

Thanks

This is a FAQ; see http://www.unix.com/answers-frequently-asked-questions/13785-yesterdays-date-date-arithmetic.html (maybe the title should be different, it's date and time arithmetic).

Hi Era,

Thnx for the help!! I tried to view the scripts but there are too many modifications in the thread. Can u plz provide me with the complete and rectified code? That would b of gr8 help!!!!

Thnx in advance frnd!!!!!