in reply to problem while reading multiple files

An awk solution

awk 'NR==FNR{a[$0]=$0;next}$0 in a{print}' file2 file1


~suhail