Deve ser simples o suficiente em sed
:
sed 's/.ENSG[0-9]*$//'
Eu tenho um arquivo como este
>gene1*ENSG24
CTTGGGGGGCTGGGGGCCAGGTGAAAGGGAAATGGAGGGCAGCACCCGCG
AGCCCTCATTGCCTATAGTGGTTTCCATGGCGATCATGTAAGAGTCAATG
TCGTCATTGGCAAAGTCGTCCGGGTGGGGTGTGCTGTAGGCAGAATCGGA
GTATCAGGGAGGGGACTGGGGGAGCAGAGGCAGGGCCCCACCTTGGAGGG
CTCGAAGGGAGCTCTGGGGCCCCCGACCACTGGAGA
>gene2*ENSG87
CCATTTTGAAACCCTTAATAAAAACTTGCTGGTCTGAGACTCAGCAGGCA
GCACAGACTTACTGATATGTACTGTCACCTCCAGCGGCCCAGCTGTAAAA
TTCCTCTCTTTGTAGTGTCTCTCTTTATTTCTCAGCTGGCTGACACTTAT
GGAAAATGGAAAGAACCTATGTTGAAATATTGGGGGCAGGTTCCATCAAT
AGTTCTTACATGG
Eu quero a saída no formato abaixo
>gene1
CTTGGGGGGCTGGGGGCCAGGTGAAAGGGAAATGGAGGGCAGCACCCGCG
AGCCCTCATTGCCTATAGTGGTTTCCATGGCGATCATGTAAGAGTCAATG
TCGTCATTGGCAAAGTCGTCCGGGTGGGGTGTGCTGTAGGCAGAATCGGA
GTATCAGGGAGGGGACTGGGGGAGCAGAGGCAGGGCCCCACCTTGGAGGG
CTCGAAGGGAGCTCTGGGGCCCCCGACCACTGGAGA
>gene2
CCATTTTGAAACCCTTAATAAAAACTTGCTGGTCTGAGACTCAGCAGGCA
GCACAGACTTACTGATATGTACTGTCACCTCCAGCGGCCCAGCTGTAAAA
TTCCTCTCTTTGTAGTGTCTCTCTTTATTTCTCAGCTGGCTGACACTTAT
GGAAAATGGAAAGAACCTATGTTGAAATATTGGGGGCAGGTTCCATCAAT
AGTTCTTACATGG
Eu quero remover a parte * ENSG. Como posso fazer isso?
Tags text-processing sed