Computing.Net > Forums > Unix > Grepping with Awk from 2 columns

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Grepping with Awk from 2 columns

Reply to Message Icon

Name: daelomin
Date: March 15, 2007 at 11:00:26 Pacific
OS: linux mandriva
CPU/Ram: P4 1Gig
Comment:

I have recently tried to do the following:I want to grep 2 values from lines in a small file (file1) into a big file (file2).

File1 could be like:
23 45 HAHAHA YEAH
66 21 HOHOOEO AOO

File2 being:
12 34 LAZE AZE
23 45 KOOL AND
45 66 YOYOMA!
66 21 THE GANG

Now basically, I want to grep the first 2 columns from file1 in file2 (and eventually concatenate the whole line), so kinda like this:
23 45 HAHAHA YEAH KOOL AND
66 21 HOHOOEO AOO THE GANG



Sponsored Link
Ads by Google

Response Number 1
Name: daelomin
Date: March 15, 2007 at 11:01:34 Pacific
Reply:

obviously (?!) I do not know what the values of the columns will be...


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Grepping with Awk from 2 columns

how to fetch the fileds from 2 text files? www.computing.net/answers/unix/how-to-fetch-the-fileds-from-2-text-files/8373.html

Help with AWK to extract text block www.computing.net/answers/unix/help-with-awk-to-extract-text-block/7987.html

script to combine data from 2 files www.computing.net/answers/unix/script-to-combine-data-from-2-files/8101.html