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
merging two files rameshonline Shell Programming and Scripting 14 04-06-2009 02:20 AM
replace the n'th occurance in a file subin_bala UNIX for Dummies Questions & Answers 2 06-04-2008 11:05 AM
how to delete text from line starting pattern1 up to line before pattern2? repudi8or Shell Programming and Scripting 5 04-15-2008 10:25 PM
merging few columns of two text files to a new file kolvi Shell Programming and Scripting 4 09-15-2005 05:34 AM
How to find n'th row from UNIX file? nvkuriseti UNIX for Advanced & Expert Users 3 04-29-2005 09:21 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 05-30-2005
olga olga is offline
Registered User
  
 

Join Date: May 2005
Posts: 4
merging 2 files starting at the n'th line of the first file

Hi all,
I wonder if anyone could help me: I want to merge 3 files
together as shown below

I've seen the post adding columns from 01-05-2002, 09:23 AM
so know how to put 2 files together

basically I want to take output file of 1st merge and merge it with a 3rd file
but only start the merging at the n'th line of the file

so got output something like
line1 file1 line1 file2
line2 file1 line2 file2
line3 file1 line1 file3
line4 file1 line2 file3
line5 file1 line3 file3

for eample
file1:
2 3 0
6 2 0
2 3 1
5 3 1
6 9 1

file2
2 2 2
2 2 2

paste -d " " file1 file2 >"outputfile1"

outputfile1
2 3 0 2 2 2
6 2 0 2 2 2
2 3 1
5 3 1
6 9 1

now I want to merge in file3 from the 1st line with col3==0

file3
3 3 3
3 3 3
3 3 3

giving me outputfile2 to look like
outputfile1
2 3 0 2 2 2
6 2 0 2 2 2
2 3 1 3 3 3
5 3 1 3 3 3
6 9 1 3 3 3


Thanks a million for any suggestions offered
Best Regards,
Olga
 

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 06:31 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