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
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
Summary: There are probably any number of ways to do this. One way is two create a temp file with the required 2 columns then use the paste command to glue the files together: awk ' { printf ("%s %s", $4, $5)...
Summary: Hi there I am hoping you could help me with a script that would search for a word and extract the block of text containing it. This is a log file containing multiple messages. I would like to first se...
Summary: Hi, I'm trying to combine columns of data from two text files. I'd like to take every line of column 2 from text file A and every line of column 3 from text file B. Then write every combination of lin...