title: Can cat print variables inline from a text file? bash
body: <p>Using bash, I'm trying to print the entire text file, including values of variables inside a text file instead of the literal text ($var).</p>
  
  <p><strong>txtfile.txt</strong></p>
  
  <pre><code>Here is some text. $var1 Here is some more. $var2
  </code></pre>
  
  <p><strong>using cat</strong></p>
  
  <pre><code>    cat txtfile.txt
  </code></pre>
  
  <p>prints</p>
  
  <blockquote>
    <p>Here is some text. $var1 Here is some more. $var2</p>
  </blockquote>
  
  <p>How can I get it to expand the values of $var1 and $var2 in output ?</p>