title: Why does double brackets notation escape strings in bash?
body: <p>Given the following example code:</p>
  
  <pre><code>var="foo"
  if [[ ${var} != 'bar' ]]; then...
  </code></pre>
  
  <p>If you run this piece of code in bash debug mode (<code>bash -x</code>), it reads out as follows:</p>
  
  <pre><code>[[ foo != \b\a\r ]]
  </code></pre>
  
  <p>It still passes correctly, but why does it show the escapes? Is there a better way to do this?</p>