Transpose a file in bash
- by Thrawn
Hi all,
I have a huge tab-separated file formatted like this
X column1 column2 column3
row1 0 1 2
row2 3 4 5
row3 6 7 8
row4 9 10 11
I would like to transpose it in an efficient way using only using commands (I could write a ten or so lines Perl script to do that, but it should be slower to execute than the native bash functions). So the output…