aawk '/-/{print a["s"] " " a["t"] " " a["o"] " " a["p"] " " a["q"] " " a["r"];delete a}/NSMSRDOTOT/{a["s"]=$4;next}/OK/{a["t"]=substr($0,4,14)}/NSMSSMRLTOT/{a["o"]=$2;next}/NSMSSRSUCC/{a["p"]=$2;next}/NSMSCMTOT/{a["q"]=$2;next}/NSMSCMRSUCC/{a["r"]=$2;next}END{print a["s"] " " a["t"] " " a["s"] " " a["o"] " " a["p"] " " a["q"] " " a["r"];}' SHMSGSERV_FRMT > SHMSGSERV_ST1
eshaqur@SA-00001256 ~
$ more SHMSGSERV_ST1
Apr 29, 08:10
BC0 Apr 29, 09:10 75718 69284 71264 70947
BC0 Apr 29, 10:10 132640 117741 121283 120752
BC0 Apr 29, 11:10 136221 120417 124147 123444
BC0 Apr 29, 12:10 148035 131664 135324 134636
BC0 Apr 29, 13:10 152827 135744 140179 139368
BC0 Apr 29, 14:10 150850 133703 138401 137207
BC0 Apr 29, 15:10 163147 145137 150564 149213
BC0 Apr 29, 16:10 155973 139644 144903 143648
BC0 Apr 29, 17:10 128839 113721 118061 116733
BC0 Apr 29, 18:10 109105 94244 98666 97336
BC0 Apr 29, 19:10 275173 253999 261961 260140
BC0 Apr 29, 20:10 117569 103414 107990 107031
BC0 Apr 29, 21:10 154075 140012 145490 143989
BC0 Apr 29, 22:10 147183 132533 138084 136705
BC0 Apr 29, 23:10 116536 103502 108550 107136
BC0 Apr 30, 00:10 90627 81116 84834 83888
BC0 Apr 30, 01:10 91603 81704 85411 84404
BC0 Apr 30, 02:10 48717 41932 44387 43707
BC0 Apr 30, 03:10 25568 19609 21621 21069
BC0 Apr 30, 04:10 24134 18141 20369 19818
BC0 Apr 30, 05:10 27281 21039 23085 22602
BC0 Apr 30, 06:10 20197 14548 16425 16006
BC0 Apr 30, 07:10 64339 57536 59944 59421
BC0 Apr 30, 08:10 67924 60928 63454 62923
BC0 75084 66988 69505 69025
Apr 29, 08:10
BC1 Apr 29, 09:10 73217 66623 68597 68300
BC1 Apr 29, 10:10 132352 117378 120546 120090
BC1 Apr 29, 11:10 136173 120310 123935 123225
BC1 Apr 29, 12:10 149633 132913 136477 135684
BC1 Apr 29, 13:10 155227 137945 142211 141269
BC1 Apr 29, 14:10 151757 134944 139330 138133
BC1 Apr 29, 15:10 163520 145789 150753 149422
BC1 Apr 29, 16:10 156308 140660 145262 144054
BC1 Apr 29, 17:10 128118 113240 117500 116231
BC1 Apr 29, 18:10 107601 92917 97077 95934
BC1 Apr 29, 19:10 275424 254697 262130 260353
BC1 Apr 29, 20:10 116571 103111 107399 106415
BC1 Apr 29, 21:10 151778 137831 143047 141578
BC1 Apr 29, 22:10 144230 130270 135890 134411
BC1 Apr 29, 23:10 116580 103719 108494 107286
BC1 Apr 30, 00:10 90498 81319 84828 83850
BC1 Apr 30, 01:10 90167 81645 84790 84000
BC1 Apr 30, 02:10 47141 40665 42801 42239
BC1 Apr 30, 03:10 26517 20543 22467 21901
BC1 Apr 30, 04:10 22754 16956 18901 18460
--More--(18%)