I have file like Below. But header are in different line the header Values are printed in down to the hear. I want all the header in single row & value to the Particular header to be print to below to the respective header
INPUT
name1 name2 name3 name4
XXXX IN SERVICE 22905 dhr
Name5
123445678
12345687
Nam6 Name7 Name8 Name9 name10
firstin_firstout godwith 1234 17 david
Name11 Name12
dhame Dame2
rame Ragha
OUTPUT
name1 name2 name3 name4 Name5_1 Name5_2 Nam6 Name7 Name8 Name9 name10 Name11_1 Name11_2 Name12_1 Name12_2
XXXX IN SERVICE 22905 dhr 123445678 12345687 firstin_firstout godwith 1234 17 david dhame rame Dame2 Ragha