How to print two lines if first lines matches a pattern?

30 views Asked by At

I have a long file (fasta) like this:

>Eha-Novel-38_5p 
ACCCATTTTCGTCTGAGGATAAT
>Eha-Novel-38_3p* 
TTTCCCAGACCCAAATGGGTGC
>Eha-Novel-46_3p 
AATGGCGGCCTGATATCCCGGA
>Eha-Novel-46_5p* 
TGGGGTATTAAGCCGCGATTGT
>Eha-Novel-44_3p 
TATCACAGTCATTTACGGGTAC
>Eha-Novel-44_5p* 
TCCCGTATTTGACTGTGACTGAG

I want to print only lines without the "*" and its following line.

Desired output:

>Eha-Novel-38_5p 
ACCCATTTTCGTCTGAGGATAAT
>Eha-Novel-46_3p 
AATGGCGGCCTGATATCCCGGA
>Eha-Novel-44_3p 
TATCACAGTCATTTACGGGTAC

I tried using grep "*" -v -A 1 FILE, but that did not work.

Thanks for your help.

0

There are 0 answers