view full story

http://www.unix.com – Code: cat file1 1 a b c 2 d e f 3 a f r Code: cat file2 a c e output should be Code: 1 3 means: if field 1 of file2 matches filed 2 of file1 then print field 1 of file1 I know that it can be done using awk NR=FNR. But not able to acheive it. Thanks in advance. (HowTos)