Hi I have an input file in this format.
[Header A]
key1 value1
key2 value2
[Header B]
header1 header2 header3 // separated by tab
1 2 3 //separated by tab
a b c //separated by tab
[Header C]
a
b
c
I have to output whatever is in HeaderB as another csv file
So the CSV file will look like
header1,header2,header3
1,2,3
a,b,c
I wrote a python script to do that but the requirement it to do it via a shell command. I don’t have much idea about writing complicated shell commands. Can someone help me.
Thanks
This will work for you:
Example