title: sed substitution with Bash variables
body: <p>I am trying to change the values in a text file using sed in a Bash script with the line,</p>
  
  <pre><code>sed 's/draw($prev_number;n_)/draw($number;n_)/g' file.txt &gt; tmp
  </code></pre>
  
  <p>This will be in a <code>for</code> loop. Why is it not working?</p>