I have a text file which has several lines of codons each line has a set of three nucleotide sequence , it can be either an A,T,G,C but only three of them in a line. (eg. ATC) now, I want to write a while loop that can read these lines and count them and give me the output the codon and the number of times it occurred in the file being the highest to the lowest.
you cant use awk in this loop but using only grep and uniq. Thanks
sortwould be convenient.I want to writeThen do it. You can find much help online on how to read a file line by line or like counting unique lines. If you want others to do the job for you, try freelancing sites, where you offer money for others work.grep -P '^[ACGT]{3}$'beforesort | uniq -c'