In bash, suppose I have the input:
ATGTGSDTST
and I want to print:
AT
ATGT
ATGTGSDT
ATGTGSDTST
which means that I need to look for all the substrings that end with 'T' and print them. I thought I should use sed inside a for loop, but I don't understand how to use sed correctly in this case. Any help? Thanks