title: Variable is not being set properly
body: <p>Whenever I try to use one variable to build another I get unexpected results.  I've narrowed it down a bit but could use a little help on what's happening here.  My local script does this:</p>
  
  <pre><code>CUR_TIME=$(date "+%Y%m%d_%HH%MM%SS")
  CUR_TIME="build_"$CUR_TIME
  </code></pre>
  
  <p>That gives me the desired results.  However, whenever I try to use this to build another variable or echo something containing this variable:</p>
  
  <pre><code>echo "/home/path/blah/$CUR_TIME"
  </code></pre>
  
  <p>My result only echos the <code>$CUR_TIME</code> variable back.  What is happening here?</p>
  
  <p>The <code>$CUR_TIME</code> variable is set on my local shell session, I'm getting additional variables from a remote server via ssh like this <code>additional_vars=$(ssh user@server "cat variables.properties")</code></p>
  
  <p>I then do <code>eval $addtional_vars</code>.  The <code>$additional_vars</code> includes quite a few variables and echoing them individually works fine.  </p>
  
  <p>So I then build or echo out the new variable using this format:</p>
  
  <pre><code>echo "/home/path/blah/$additional_var1/"
  </code></pre>
  
  <p>This echoes properly, but if I do this (reverse):</p>
  
  <pre><code>echo "/$additional_var1/home/path/blah"
  </code></pre>
  
  <p>My result is just <code>/home/path/blah</code>.  </p>
  
  <p><strong>EDIT</strong></p>
  
  <p>After further troubleshooting it looks like if I include <em>any</em> of my vars from <code>$additional_vars</code> to the path name and put it before anything I specify, it results in that part of the path being null.  So it's not just the <code>$CUR_TIME</code> variable.  What's weird is that echoing out an <code>$additional_var</code> by itself is fine.</p>
  
  <p>My .properties file looks like this:</p>
  
  <pre><code>var1="something"
  var2="something2"
  var3="something3"
  var3="ftp://something/another/$something_else"
  var4="something.something"
  </code></pre>
  
  <p>If I test <code>eval $additional_vars</code> using <code>printf ${additional_vars} | hexdump -C</code>, my output results in a hex value and then <code>|var1="something".|</code></p>