Honored Contributor Honored Contributor
Re: Grep in AWK
Hi again,

What you could do is something like that:

cat myfile | awk 'BEGIN { while (getline) {
print $0
# do some further processing, knowing that each line is stored
in $0
} # end while
}' | while read myvar
do
grep $myvar file2
done

This is quick and dirty, but this should do the trick.

Bests !

Fred.