title: replace text with a variable
body: <p>I want to replace the value with a variable. The following does not work because of the single quote used in sed.</p>
  
  <pre><code>#!/bin/sh
  set myvarM='pqr'
  sed 's/:P03:M15/:P02:M1$myvarM/' mychange.txt &gt; new_mychange.txt
  </code></pre>
  
  <p>Can I change the sed command or should I use something else?</p>