I want to know how to process block of lines using awk.
For example,
Sample File:
20130113 18:07:50 PROCESS START
ABC
XYZ
DEF
20130113 18:07:52 PROCESS END for ID 123
20130113 18:07:52 PROCESS START
ABC
XYZ
DEF
20130113 18:07:53 PROCESS END for ID 124
For the duration you need complex date/time arithmetics to take into account e.g. durations crossing midnight. There's quite some threads on this available, pls. search this forum.
However, try this: