title: Sed replace value with variable
body: <p>I have a variable in a config, which I would like to replace with a value.</p>
  
  <pre><code>ROOT="rROOT"
  </code></pre>
  
  <p>I would like to replace that with</p>
  
  <pre><code>ROOT="$root"
  </code></pre>
  
  <p>So with the value of $root (Important are the quotation marks).</p>
  
  <p>So far I have tried it that way</p>
  
  <pre><code>sed -i s/'ROOT=rROOT'/'ROOT="$root"'/g $directory/settings.conf
  </code></pre>
  
  <p>The result is that</p>
  
  <pre><code>ROOT="$root"
  </code></pre>
  
  <p>But this is stored in the variable $root (It is always a path)</p>
  
  <pre><code>root: /
  </code></pre>
  
  <p>How can I replace rROOT with the value of $root?</p>
  
  <p>Sed Version: (GNU sed) 4.2.2</p>