I have an input text file in unix with this kind of data.
Event_date:20190512044638
Error_code:5858
Event_type:GPRS data
Duration:772
Missing_provider_id:46009
Event_date:20190512044638
Error_code:780678
Event_date:20190512064535
Error_code:5858
Event_type:GPRS data
Duration:2172
Missing_provider_id:722310
i want this data to be in this output format:
Event_date Error_code Event_type Duration Missing_provider_id
20190512044638 5858 GPRS data 772 46009
20190512044638 780678
20190512064535 5858 GPRS data 2172 722310
I tried a combination of awk and sed commands, but didn't work out.
How can i achieve this output?
Event_date:20190512044638
Error_code:5858
Event_type:GPRS data
Duration:772
Missing_provider_id:46009
Event_date:20190512044638
Error_code:780678
Event_date:20190512064535
Error_code:5858
Event_type:GPRS data
Duration:2172
Missing_provider_id:722310
i want this data to be in this output format:
Event_date Error_code Event_type Duration Missing_provider_id
20190512044638 5858 GPRS data 772 46009
20190512044638 780678
20190512064535 5858 GPRS data 2172 722310
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…