title: Remove pattern from each line in fasta file in
body: <p>I have a fasta file, file.fasta, that has the following patterns:    </p>
  
  <pre><code>&gt;firstnumber 01abc_numericsequence    
  CGTAATCG  
  &gt;secondnumber 01abc_anothernumericsequence  
  GGTAAACC    
  </code></pre>
  
  <p>and so on, but I'd like the output to be something like:    </p>
  
  <pre><code>&gt;firstnumber   
  CGTAATCG  
  &gt;secondnumber   
  CGTAAACC  
  </code></pre>
  
  <p>How can I delete the pattern 01abc and everything that goes after it in each line, and overwrite the file.fasta?</p>
  
  <p>Please, can anyone provide a solution?</p>