title: Shell variables in sed script
body: <p>The sed command works as expected at the command prompt, but does not work in a shell script.</p>
  
  <pre><code>new_db_name=`echo "$new_db_name" | sed 's/$replace_string/$replace_with/'`
  </code></pre>
  
  <p>Why is that, and how can I fix it?</p>