title: Use Variable in Command Substitution
body: <p>I need some help with the following simple bash script, where the variable <code>i</code> does not seem to get substituted when running <code>curl</code> (causing an error).</p>
  
  <p>(This is just a simple abstraction of the actual script)</p>
  
  <pre><code>for i in {1..3}
  do
    HTML=$(curl -s 'http://example.com/index.php?id=$i')
  done;
  </code></pre>