I am stuck with this activity ,I have a txt file like below
0112 00000 34 JOB RECOVERY status poll (ORDERID 2N000, RUNNO 0001) ACCEPTED, OWNER
0112 00000 35 JOB RECOVERY status poll (ORDERID 2N000, RUNNO 0001)STARTED , APPL TYPE
0112 00000 36 JOB PROCESS Kafka(ORDERID 2N001, RUNNO 0001) ACCEPTED , OWNER
0112 00001 37 JOB PROCESS Kafka (ORDERID 2N001, RUNNO 0001) STARTED, APPL_TYPE
0112 00001 38 JOB RECOVERY status poll(ORDERID 2N000, RUNNO 0001) ENDED OK ,ELAPSED - 0.02 SEC
0112 00003 39 JOB PROCESS (ORDERID 2N001, RUNNO 0001) ENDED OK, ELAPSED - 2.28 SEC
I need to get elapsed - value for each orderid
for each job , I need like if orderid
is 2N000, then the elapsed I should get-0.02 sec. like this for each orderid
I need to get from the file using shell script.
I need the output like
orderid jobname ELAPSED
2N000 RECOVERY status 0.02
2NOO1 PROCESS Kafka 2.28
PROCESS Kafka
output when there is a single space in every similar source line?2N000
you want an elapsed time of-0.02
, but you don't show that in the example outputorderid jobname ELAPSED 2N000 RECOVERY status 0.02 2NOO1 PROCESS Kafka 2.28
?