Skip to main content

Thread: Linux text manipulation: sort columns according to the first row


let's have 50,000 rows of data looks following:


b d c z e f ......
3 1 4 1 9 2 3 ......
...... ......
0 1 3 4 2 4 8 ......


, want sort columns of data according first row, such output looks like:

b c d e f ...... z
1 3 1 4 2 3 ...... 9
...... ......
1 0 4 3 4 8 ...... 2



how do that?


tried transpose columns rows using "awk," , use "sort" command, , transpose use "awk."

awk doesn't work if number of columns exceed ~33k, happens when rows first transposed columns, i.e., transposing didn't work me.


idea how this?

in advance.

is pasting openoffice version of spreadsheet , using sort function there, pasting file not option? if have lot of them, can use openoffice spreadsheet thingy automate process.


Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [all variants] Linux text manipulation: sort columns according to the first row


Ubuntu

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

PProHeadless.exe has stopped working error when opening projects in Adobe Media Encoder CS6

Preconditions Failed. - Joomla! Forum - community, help and support