title: Resolve variable read from file
body: <p>I'm trying to read part of a line from a <code>.txt</code> file, which holds a filename. I use that filename to execute several commando's. However, the variable doesn't seem to resolve correctly.</p>
  <p>file.txt</p>
  <blockquote>
  <p>Lookup-File: file.tar.gz</p>
  </blockquote>
  <p>code</p>
  <pre><code>lookupFileMD5=`grep -A1 ^Lookup-File $metadataFile | grep ^MD5-Digest | cut -d' ' -f2`
      echo &quot;lookupFileMD5=$lookupFileMD5&quot;
      lookupFileMD5downloaded=`md5sum $path/$lookupFileName | cut -d' ' -f1`
  </code></pre>
  <p>output</p>
  <blockquote>
  <p>2016-09-29 13:57:00 [INFO] - ++ grep -A1 '^Lookup-File' file.txt</p>
  <p>13:57:11           2016-09-29 13:57:02 [INFO] - ++ cut '-d ' -f1</p>
  <p>13:57:11           2016-09-29 13:57:02 [INFO] - ++ md5sum $'/path/file.tar.gzr'</p>
  <p>13:57:11           2016-09-29 13:57:02 [INFO] - md5sum: /path/file.tar.gz</p>
  <p>13:57:11           : No such file or directory</p>
  </blockquote>
  <p>problem</p>
  <p>The actual filename is file.tar.gz but in the command (last line) it resolves to <code>md5sum $'/path/file.tar.gzr'</code>, with the additional <code>$'..r'</code>.</p>