![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| merge two files using awk | hariza | Shell Programming and Scripting | 2 | 10-06-2008 01:33 PM |
| How to merge and add?? Two Files | Unice | Shell Programming and Scripting | 6 | 09-22-2008 01:59 PM |
| changing data into matrix form | g0600014 | UNIX for Dummies Questions & Answers | 1 | 06-19-2008 03:24 PM |
| merge files | koti_rama | Shell Programming and Scripting | 5 | 12-24-2007 10:59 PM |
| use of sed over cat to merge files | miwinter | UNIX for Advanced & Expert Users | 2 | 11-28-2007 01:36 PM |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
Merge 70 files into one data matrix
Hi, I have a list of 70 files in a directory and I need to merge the content of each file into one big matrix file (71 columns x 3060 rows). Each file has the following format only two columns per file: Code:
unique identifier1 randomtext1 randomtext1 a 5 b 3 c 6 d 3 e 2 f 9 Things that need to consider: 1) The first column, 'unique' is a unique field among each file, it's the second column that is different and what I need merged into one data matrix. 2) The randomtext line (second line of each file) I wish I could ignore in my final file... 3) Note, not all files are sorted as the example I posted above. Final merged file, should be Code:
unique identifier1 indentifer2 . . . . . a 5 4 . . . . . . b 3 2 . . . . . . c 6 6 . . . . . . d 3 7 . . . . . . e 2 9 . . . . . . f 9 4 . . . . . . Obviously, I need 71 columns in the final file, with the first column as the 'unique' field and the other 70 columns to be the associated value from the 70 files in the common directory. Can someone help me? Thanks in advance. |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|