Removendo o conteúdo de um arquivo

0

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?

    
por user3138373 10.12.2014 / 00:08

1 resposta

3

Deve ser simples o suficiente em sed :

sed 's/.ENSG[0-9]*$//'
    
por 10.12.2014 / 00:10