5

Transpose whole file and specific columns

view full story
linux-howto

http://www.unix.com – Hi, I have a file like this Code: a b c d e f g h i j k l Case1: I want to transpose the whole file Output1 Code: a d g j b e h k c f i l Case2 Transpose a specific column - Say 3rd Output2 Code: c f i l Case3 Transpose a range of columns - say 1 and 2 Output3 Code: a d g j b e h k Case4 Transpose specific multiple columns - say 1 and 3 Output Code: a d g j c f i l Initally, I was helped in this forum for transposing a single column of this kind input Code: a b c d using Code: tr '\n' ',' < input.txt Outpu (HowTos)