title: bash script - use and expand variable in cat
body: <p>In my bash script I have this:</p>
  <pre><code>myapphome=/home/username/Documents/myapp
  
  cat &lt;&lt; 'EOT' &gt; &quot;$myapphome&quot;/some.properties
  dir.root=&quot;$myapphome&quot;/app_data
  EOT
  </code></pre>
  <p>Expected in some.properties:</p>
  <pre><code>dir.root=/home/username/Documents/myapp/app_data
  </code></pre>
  <p>But in actual it is:</p>
  <pre><code>dir.root=&quot;$myapphome&quot;/app_data
  </code></pre>
  <p>What I am doing wrong here? I mean I want to expand the $myapphome in my some.properties file.</p>