Thread: looping in awk
View Single Post
Old May 27th, 2005, 3:32 PM   #1
gwilliam
Newbie
 
Join Date: May 2005
Location: swansea wales uk
Posts: 2
Rep Power: 0 gwilliam is on a distinguished road
Smile looping in awk

I need awk to work with two files, read a single column from file1, and taking each value, search for that value in file2.

I guess I need perhaps two forms of "while" loops, one within the other, but cannot get anything to work.

Could anyone give me a simple example to build on?

file1 is created by another process and could have 10 or 20 "codes" that I want to search for in file2 at a fixed position e.g. substr($3,5,4).

Heres hoping someone has done this....
gwilliam is offline   Reply With Quote