title: Remove non printing chars from bash variable
body: <p>I have some variable <code>$a</code>. This variable have non printing characters (carriage return ^M).</p>
  
  <pre><code>&gt;echo $a
  some words for compgen
  &gt;a+="END"
  &gt;echo $a
  ENDe words for compgen
  </code></pre>
  
  <p>How I can remove that char? 
  I know that <code>echo "$a"</code> display it correct. But it's not a solution in my case.</p>