The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Adding columns of two files chandra321 Shell Programming and Scripting 7 05-06-2009 01:11 PM
adding columns Kelam_Magnus Shell Programming and Scripting 12 02-10-2009 10:56 AM
awk adding columns from different files dsstamps Shell Programming and Scripting 1 09-16-2008 06:36 PM
Adding columns to a file figaro UNIX for Dummies Questions & Answers 5 07-21-2008 02:50 AM
Adding columns in csv chachabronson UNIX for Advanced & Expert Users 7 06-27-2008 10:06 AM

 
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 4 Weeks Ago
zajtat zajtat is offline
Registered User
  
 

Join Date: Jul 2009
Posts: 51
Adding loads of columns

Hi All,

I've got file1 like this:
Code:
aaa bbb ccc
ddd eee fff
ggg hhh kkk
ppp mmm nnn
and file 2 like this:
Code:
aaa qqq www
ddd fff ggg
ggg sss zzz
ppp vvv yyy
and file 3 like this:
Code:
aaa 
ggg
ppp
I need to match the first column of file3 and file1, then add the rest of the file 1 to the file3. The result would be:
Code:
aaa bbb ccc
ggg hhh kkk
ppp mmm nnn
Then again match the first column and add the rest of the file2. The result would be:
Code:
aaa bbb ccc qqq www
ggg hhh kkk sss zzz
ppp mmm nnn vvv yyy
I've got many files and each of them has matching patterns in first column and then loads of columns that I need to all add into one file. Hope this is not too confusing :-)

Any help will be GREATLY appreciated! It doesn't need to be a big loop or anything, I don't mind if someone could help me with the first step only...

Many thanks!
 

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 08:06 PM.


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