title: mv: cannot move file to '': No such file or directory in bash
body: <p>I have following command </p>
  
  <pre><code>mv 15827.png  "$(&lt;15827.png.txt)"
  </code></pre>
  
  <p>Which is moving the file 18827.png to the path specified in 15827.png.txt, and it is working fine.</p>
  
  <p>But when I moved this command to shell script  </p>
  
  <pre><code>#!/bin/bash
  mv 15827.png  "$(&lt;15827.png.txt)"
  </code></pre>
  
  <p>I'm running it with:</p>
  
  <pre><code>sh myscript.sh
  </code></pre>
  
  <p>Its not working and I am getting following error:</p>
  
  <blockquote>
    <p>mv: cannot move '15827.png' to '': No such file or directory  </p>
  </blockquote>
  
  <p>The file <code>15827.png.txt</code> contains the digit <code>7</code> and there is folder named <code>7</code> in the current directory.</p>