Matching text using grep or awk

前端 未结 3 1580
轮回少年
轮回少年 2021-01-06 10:45

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:

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-06 11:28

    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
    

提交回复
热议问题