I have a file in the following format.
abc|xyz|mno
x up x
up up x
x x up
abc|xyz|mno
x x x
up x x
....
....
Basically the first line of the file are device names (|ed)
and following lines are states of the devices.
I would like the output to be in the following format:
abc,x|xyz,up|mno,x
abc,up|xyz,up|mno,x
abc,x|xyz,x|mno,up
abc,x|xyz,x|mno,x
abc,up|xyz,x|mno,x
....
....
Do you have any pointers?