Hi,
I have the following output in a file:
NODE_NAME DATE(GMT) TIME_PERIOD UNITS TUPS
--------- ---------- ----------- ------------ ---------
slc-a 03/08/2016 08:45-08:50 94 0.3
03/08/2016 08:50-08:55 109 0.4
03/08/2016 08:55-09:00 71 0.2
03/08/2016 09:00-09:05 85 0.3
03/08/2016 09:05-09:10 55 0.2
03/08/2016 09:10-09:15 69 0.2
03/08/2016 09:15-09:20 85 0.3
03/08/2016 09:20-09:25 93 0.3
03/08/2016 09:25-09:30 81 0.3
03/08/2016 09:30-09:35 77 0.3
03/08/2016 09:35-09:40 73 0.2
03/08/2016 09:40-09:45 78 0.3
********* ********* ********* ********* *********
slc-a 03/08/2016 08:45-08:50 9 0.0
03/08/2016 08:50-08:55 7 0.0
03/08/2016 08:55-09:00 7 0.0
03/08/2016 09:00-09:05 8 0.0
03/08/2016 09:05-09:10 5 0.0
03/08/2016 09:10-09:15 5 0.0
03/08/2016 09:15-09:20 3 0.0
03/08/2016 09:20-09:25 4 0.0
03/08/2016 09:25-09:30 8 0.0
03/08/2016 09:30-09:35 8 0.0
03/08/2016 09:35-09:40 3 0.0
03/08/2016 09:40-09:45 4 0.0
********* ------------ ---------
I am trying to capture the last timestamps from the first section and also from the last, i.e.
03/08/2016 09:40-09:45
to be able to get the UNITS results, so basically my answer should be:
03/08/2016 09:40-09:45 78
03/08/2016 09:40-09:45 4
Honestly I don't know from where I can start if I try using awk or sed. Can you help out?