linux – Read DNA trinucleotides

How can you read a text string, reading its characters in threes? Specifically, I want to read the trinucleotides of a DNA sequence, and be able to count how many there are.

I would like to divide it into AAG ACA GAG … But the problem is that I do not have a delimiter to use the cut command.

How could I solve it?