file.contain.query.txt
ENST001 ENST002 ENST003
file.to.search.in.txt
ENST001 90 ENST002 80 ENST004 50
If the files are already sorted:
join file1 file2
if not:
join <(sort file1) <(sort file2)