Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有以下文件
ENST001 ENST002 4 4 4 88 9 9 ENST004 3 3 3 99 8 8 ENST009 ENST010 ENST006 8 8 8 77 8 8
基本上我想计算ENST *在每一行中重复了多少次,所以预期的结果是
2 1 3
请问有什么建议吗?
试试这个(并在此处查看它的实际效果):
awk '{print gsub("ENST[0-9]+","")}' INPUTFILE