in reply to matching an array

I find myself having to do this sort of thing a lot with various pairs of files; usually the column delimiters are whitespace (like your case) and sometimes they are other things (colons, commas, or whatever); usually the "key" field is in the first column and sometimes it's elsewhere; usually I just need to see keys that make up the intersection (or union or difference) and sometimes I want to see the whole line from one file or the other or both.

So I wrote a general purpose utility to handle all that, and I use it almost every day. I posted it here: cmpcol

For your case, the command line would be:

cmpcol -i -l2 file1 file2:2 > file3
i.e.: show the intersection (-i), list full lines from the second file (-l2), compare the first column in file1 (default key field) against the second column in file2 (:2), redirect stdout to file3. HTH