Convert column data to row data using shell script

Hi,

I want to convert a 3-column data to 3-row data using shell script. Any suggestion in this regard is highly appreciated.

Thanks.

Welcome to the forum.

Please tell us the file format (sample input and output data).

tr command is very handy, man tr and check all the features.
As a simplistic example:

$ echo "Col1 Col2 Col3"
Col1 Col2 Col3
$
$ echo "Col1 Col2 Col3" | tr ' ' '\n'
Col1
Col2
Col3
$

Hi,

That's ok, but how could we do for the data like below.

x y z
f g
d h

output must be like:

x f d
y g h
z

Thanks for inputs.