001、
root@DESKTOP-1N42TVH:/home/test2# ls outcome.ped root@DESKTOP-1N42TVH:/home/test2# cat outcome.ped G G C C G G T T G G C C G G T G G G C C A A T G G G C C A A G G root@DESKTOP-1N42TVH:/home/test2# awk '{for(i = 1; i <= NF; i++) {if($i == "A") a++; if($i == "C") c++; if($i == "T") t++; if($i == "G") g++}} END {print "a=" a, "c=" c, "t=" t, "g=" g}' outcome.ped a=4 c=8 t=4 g=16