text: user260: I have an output from vcfutils.pl vcf2fq with specified minimal depth, and it means that nucleotides with not enough depth are lowercase. 
  I would like to change them to gaps. I could do it in higher language but I would like to know the solution in bash. 
  I have found simple solution to replace all lowercase to uppercase:
  awk 'BEGIN{FS=" "}{if(!/>/){print toupper($0)}else{print $1}}' in.fna > out.fna
  
  but I would like to replace lowercase with -. The first row need to be omitted. Could you help me? Thanks
  
  user1194: You can also use this solution where tr command from linux can solve your problem:
  tail -n +2  in.fna | tr '[:lower:]' '-'
  
  user1802: You could try it with sed.
  Replace all lower-case chars with - in lines not starting with >:
  sed -e '/^>/!s/[a-z]/-/g' in.fa
  
  
  user206: The following sed command will do the trick.
  sed -e '/^[^>]/ s/[a-z]/\-/g' in.fna > out.fna
  Lines starting with > will be escaped and the lowercase characters will be replaced with - .
  
original_text: 260: <p>I have an output from vcfutils.pl vcf2fq with specified minimal depth, and it means that nucleotides with not enough depth are lowercase. 
  I would like to change them to gaps. I could do it in higher language but I would like to know the solution in bash. 
  I have found simple solution to replace all lowercase to uppercase:</p>
  
  <pre><code>awk 'BEGIN{FS=" "}{if(!/&gt;/){print toupper(<span class="math-container">$0)}else{print $</span>1}}' in.fna &gt; out.fna
  </code></pre>
  
  <p>but I would like to replace lowercase with -. The first row need to be omitted. Could you help me? Thanks</p>
   1194: <p>You can also use this solution where <strong>tr</strong> command from linux can solve your problem:</p>
  
  <p><code>tail -n +2  in.fna | tr '[:lower:]' '-'</code></p>
   1802: <p>You could try it with <code>sed</code>.<br>
  Replace all lower-case chars with <code>-</code> in lines not starting with <code>&gt;</code>:</p>
  
  <pre><code>sed -e '/^&gt;/!s/[a-z]/-/g' in.fa
  </code></pre>
   206: <p>The following <code>sed</code> command will do the trick.</p>
  
  <p><code>sed -e '/^[^&gt;]/ s/[a-z]/\-/g' in.fna &gt; out.fna</code></p>
  
  <p>Lines starting with <code>&gt;</code> will be escaped and the lowercase characters will be replaced with <code>-</code> .</p>
  