title: How can I use a variable that contains a space?
body: <p>I have the following files:</p>
  
  <pre class="lang-sh prettyprint-override"><code>~/tmp/testbash$ l
  file 1.test  move.sh*
  </code></pre>
  
  <p>where <code>move.sh</code> is:</p>
  
  <pre><code>#!/bin/bash
  #-x
  
  FILENAME='file\ .test'
  echo $FILENAME
  echo joo
  mv $FILENAME test.test
  </code></pre>
  
  <p>When I run <code>./move.sh</code>, I get this output and error:</p>
  
  <pre><code>file\ .test
  joo
  mv: target `test.test' is not a directory
  </code></pre>
  
  <p>The problem is that it executes the command as:</p>
  
  <pre><code>mv file .test test.test
  </code></pre>
  
  <p>and not as:</p>
  
  <pre><code>mv file\ .test test.test
  </code></pre>
  
  <p>How can I fix this?</p>