in reply to matching an array
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:
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. HTHcmpcol -i -l2 file1 file2:2 > file3
|
|---|