title: Bash Script: No such file or directory when defining variable via source vars.txt
body: <p>I have a script that creates a hash of a file, writes it to vars.txt and then checks that variable next time the script is run to determine if the file has changed.</p>
  
  <p><a href="http://pastebin.com/QQGHGBKR" rel="nofollow">Here is the script</a> and <a href="http://pastebin.com/WJgwVdkt" rel="nofollow"> vars.txt</a> (pastebin)</p>
  
  <p>When I run the script I call the variable with <code>source /path/to/file</code></p>
  
  <p>This now gives me the following error when the file is parsed:</p>
  
  <pre><code>/opt/scripts/AutoCommit/vars.txt: line 2: etchttpdconf_dvhost.conf=925ec4d7bd0dc94c3710bcf5fb2c80f422806bb5  /etc/httpd/conf.d/vhost.conf: No such file or directory
  </code></pre>
  
  <p>On top of that, when the file changes <code>sed</code> is now not replacing the line but adding an additional line underneath. It had not done this in the past. </p>
  
  <p>You get a file that ends up <a href="http://pastebin.com/1Nv9hdss" rel="nofollow">like this.</a> Until recently this did not happen so I suspect they are both caused by the same issue.</p>
  
  <p><a href="http://pastebin.com/R7ZECL2K" rel="nofollow">Here is a stripped down version of the script, where I believe the problem may be.</a></p>