BEGIN {OFS=FS="\t";big=999999999999999999;}#https://www.biostars.org/p/77347/ { if ( ($3=="transcript") ) { split($9,format,";"); i=0;ok=0;gn="NA"; for (i in format){ if (format[i] ~ /transcript_biotype/){ gsub(/transcript_biotype "/,"",format[i]); gsub(/"/,"",format[i]); if (substr(format[i],1,1)==" "){bt=substr(format[i],2);}else{bt=format[i]};ok++; } } if (ok==1){ obt[bt]++; } } }END{ for (bt in obt){ print bt,obt[bt] } }