how to remove range from fasta header Could you please suggest me how I can remove range from fasta header:like these number from below sequences which has some colons indicating the range of the genome

:147010-147657 

:149201-149845

&gt; FVJT01000004.1:147010-147657 Mycobacterium abscessus subsp. massiliense strain 974 
GTGACCAGCAGCGCAGACCGATCCCCCGTCGAGGCGATGGTGAGCCACGCCGAGGGCGCCATCTCCGAGG
ATGACATCGTCGCCGCCGCCCGGGAACGTGCCGTTGACCTGGGCGCGGGCCCGGTGACACCCGCGGTAGG

&gt;FSAX01000002.1:149201-149845 Mycobacterium abscessus subsp. bolletii strain 286 genome 
ATGACGACGCCCGTCAGCTTCGATAACAGATTCTTCTCCGCAACGTGGTCTGCTATCGCGCGGCGCGAAC
CTCAGGAGATCAAGGAGCTGCGTGCGGAGAATCTACGCGGCCTGACCGGCCACGTTCTGGAGGTGGGAGC
Invest some time in learning unix tools such as grep, sed and awk.

sed -r '/^&gt;/s/:[0-9]+-[0-9]+//' input.fasta &gt; output.fasta


This line of code matches the pattern :&lt;numbers&gt;-&lt;numbers&gt; on lines that start with &gt; (FASTA sequence headers) and replaces that pattern with '', essentially removing text that matches the pattern.