title: Using variable with cp in bash
body: <p>The file returned will have spaces in the file name so I run the file name through sed to append quotes at the beginning and end. However, when I use $CF with cp it fails. If I manually echo $CF and use the resulting file in place of $CF it works just fine. What's the problem?</p>
  
  <pre><code>CF=`ls -tr /mypath/CHS1*.xlsx | tail -1 | sed -e 's/^/"/g' -e 's/$/"/g'`
  cp $CF "/mydest/myfile.xlsx"
  </code></pre>