Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Transpose File

$
0
0
Have various files like this:

Code:

InSlot=0x00000001
InPort=0x00000000
Inref=0x0000002f
InSID=0x00000001
OutSlot=0x00000001
OutPort=0x00000002
Outref=0x00000000
OutSID=0x0000000b
OutUName_2=14[asass]
InSlot=0x00000001
InPort=0x00000000
Inref=0x000001a8
InSID=0x00000001
OutSlot=0x00000001
OutPort=0x00000000
Outref=0x00000023
OutSID=0x00000001
OutUName_2=12[asasdas]
InSlot=0x00000001
InPort=0x00000000
Inref=0x000000e9
InSID=0x00000001
OutSlot=0x00000001
OutPort=0x00000000
Outref=0x00000020
OutSID=0x0000000b
OutUName_2=8[asaede]


Trying to transpose the file to nine columns: (from InSlot toOutUName)

Code:

InSlot,InPort,Inref,InSID,OutSlot,OutPort,Outref,OutSID,OutUName


I have tried tr and and paste with no luck. Probably AWK is the solution but I am not familiar enough with it. Thanks!

Viewing all articles
Browse latest Browse all 16232

Trending Articles