001、测试数据,,匹配末尾为_一个数字的数据
[root@pc1 test2]# ls a.txt [root@pc1 test2]# cat a.txt ## 测试数据 NC_052532.1 tRNAscan-SE TRNAD-GUC_1 NC_052532.1 tRNAscan-SE TRNAD-GUC_229 NC_052532.1 tRNAscan-SE TRNAS-AGA_1 NC_052532.1 tRNAscan-SE TRNAS-AGA_27 NC_052532.1 tRNAscan-SE TRNAS-AGA_33445 NC_052532.1 tRNAscan-SE TRNAS-AGA_45 NC_052532.1 tRNAscan-SE TRNAI-AAU_12 NC_052532.1 tRNAscan-SE TRNAD-GUC_3 NC_052532.1 tRNAscan-SE TRNAD-GUC_4334 NC_052532.1 tRNAscan-SE TRNAI-AAU_2 [root@pc1 test2]# grep -E "_[0-9]$" a.txt ## -E表示扩展正则表达式, 匹配末尾为_一个数字的数据 NC_052532.1 tRNAscan-SE TRNAD-GUC_1 NC_052532.1 tRNAscan-SE TRNAS-AGA_1 NC_052532.1 tRNAscan-SE TRNAD-GUC_3 NC_052532.1 tRNAscan-SE TRNAI-AAU_2
002、
标签:GUC,052532.1,匹配,TRNAD,NC,tRNAscan,linux,grep,SE From: https://www.cnblogs.com/liujiaxin2018/p/17924118.html