Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2000 14:26:44 -0500 (EST)
From:      Marty Poulin <mpoulin@honk.org>
To:        SIVARAM N <sivaramn@wipsys.ge.com>
Cc:        freebsd-newbies@FreeBSD.ORG
Subject:   Re: awk: working with multiple files
Message-ID:  <Pine.LNX.3.96.1000112142617.4518A-100000@spectre>
In-Reply-To: <002901bf5cdf$c696d7a0$8b2fa8c0@wipsys.ge.com>

next in thread | previous in thread | raw e-mail | index | archive | help
I think the people in freebsd-questions would be able to answer this
better than -newbies...


- M -

On Wed, 12 Jan 2000, SIVARAM N wrote:

> Hi,
> 
> I have 2 files both of which are sorted on  one column.
> 
> File1                         file2
> --------                       --------
> 
> CCLC                     CCLA     <desc> 
> CCLD                     CCLC     <desc>
> CCLK                     CCLD     <desc>
> ...                              CCLE    <desc>
>                                 ...
> 
> For every occurrence of column1 in file1, the desc should be 
> picked from file2 if an occurrence is found . How do you do
> that?
> 
> I think, reading the first file into an associative array in BEGIN would help
> but  how do I stop reading into the array after the end of the first file & work
> with the 2nd file in the body ,when the files are passed through the command
> line?
> 
> Please,no Perl , as I have only awk installed currently.
> 
> Regards,
> Sivaram
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-newbies" in the body of the message
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-newbies" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.3.96.1000112142617.4518A-100000>