I am having problems with grep and awk. I think it\'s because my input file contains text that looks like code.
The input file contains ID names and looks like this:
This will do the trick:
$ awk 'NR==FNR{a[$0];next}$NF in a{print}' input reference ENSG00000199537 SNORD115-40 ENSG00000207793 MIR432 ENSG00000207447 RNU6-2