awk saving field of first file into array

view full story

http://www.unix.com – Hello guys, I just start trying out AWK and encounter a problem, I try to think a bit but seems my way is incorrect. I have two input file, with the first file has only one field, the second file has 3 fields, I suppose to do stuffs to them by writing an awk program, kinda sort them out. Since I am not suppose to know how many records the first file has, I cant just use a for loop. I would like to save each record of the first file into an array so I can begin to compare to second file and sort thing out. But I am not sure how, can you guys give me an idea? Sorry for my english, I am not nati (HowTos)