title: Use $HOSTNAME in sed substitution
body: <p>I want to use my Centos VM's $HOSTNAME inside a call to <code>sed</code> like so:</p>
  
  <pre><code>sed -i 's/Apache 2 Test Page/$HOSTNAME Test Page/g' /var/www/error/noindex.html
  </code></pre>
  
  <p>But this just replaces <code>Apache 2 Test Page</code> with <code>$HOSTNAME Test Page</code>... I know I can do it manually, but I've got a good reason for wishing to do it this way.</p>
  
  <hr>
  
  <p><em>FWIW, I'm actually doing this inside a bash script that gets called from a Vagrantfile, which in turn provisions multiple VM's (each with Apache2 installed), so that I can test-out the load-balancing capabilities of HAProxy. so I just want a simple way to differentiate between my 3 web-servers, and II figure that modifying the default Apache page is the easiest way to do that.</em></p>