title: Pass variable from bash script to HTML
body: <p>I have a bash script that contains a variable. In the same script, I have an HTML section that, for now, outputs "Hello".</p>
  
  <p>I'd like the HTML section of the bash script to retrieve a variable, and display that in the same heading as the "Hello" section. Essentially, the output on the HTML page should be something like this "Hello Adam".</p>
  
  <p>For now, as simple as it gets, my bash script code is as follows:</p>
  
  <pre><code>#!/bin/bash
  
  firstname="Adam"
  
  echo $firstname
  
  cat &lt;&lt; _EOF_
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  &lt;h1&gt;Hello&lt;/h1&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  
  _EOF_
  </code></pre>
  
  <p>How do I get the variable in the HTML section so that it can display the $firstname variable?</p>
  
  <p>For reference, I currently run the script using <code>git-bash</code> by executing <code>sh {name-of-script} &gt; test.html</code></p>