The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
sorting csv file based on column selected tententen Shell Programming and Scripting 4 07-05-2009 11:17 PM
sorting file based on two or more columns labrazil Shell Programming and Scripting 2 09-17-2008 12:19 AM
How to check Null values in a file column by column if columns are Not NULLs Mandab Shell Programming and Scripting 7 03-15-2008 09:57 AM
sorting file content on columns marshmallow UNIX for Dummies Questions & Answers 2 01-04-2007 12:10 PM
sorting a file with multiple columns outtacontrol UNIX for Dummies Questions & Answers 3 07-26-2006 02:51 PM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 10-02-2009
doobedoo doobedoo is offline
Registered User
  
 

Join Date: Oct 2009
Posts: 12
Unhappy Transposing column to row, joining with another file, then sorting columns

Hello!
I am very new to Linux and I do not know where to begin...

I have a column with >64,000 elements (that are not in numberical order) like this:

name
2
5
9
.
.
.
64,000

I would like to transpose this column into a row that will later become the header of a very large file (>1000 rows X >64,000 columns) so that the row looks like:

name 2 5 9 . . . 64,000

Next I need to concatenate this header with the actual data file (data points are letters) so that:

name 2 5 9 . . .64,000
jim A C A . . .T
max T G A . . .T
mary T C T . . .A
.
.
.
kate A C A . . .A

Finally, I need to sort the columns so that they are in numerical order but the name column remains in the first position so that

name 1 2 3 . . .64,000
jim A A A . . .G
max C T A . . .C
mary C T T . . .C
.
.
.
kate A A T . . .G

Can anyone help me with this?

Thanks,
doob
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:23 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0