title: sed Command adding space at start of line
body: <p>I am trying to use the sed program to replace two lines of text in a config file using bash variables, the line replacement works however there is a extra space at the start of the line.</p>
  
  <p>My commands are as follows:</p>
  
  <pre><code>replacement="computer_id = $server_ref"
  </code></pre>
  
  <p>(where $server_ref is a user entered variable)</p>
  
  <p>and then:</p>
  
  <pre><code>sed "/computer_id/c \ ${replacement}" -i slapos.cfg
  </code></pre>
  
  <p>The other line being replaced uses just the same commands just changes a different variable in the config file.</p>
  
  <p>The ouput of this change looks like</p>
  
  <pre><code> computer_id = something
  </code></pre>
  
  <p>when it should be</p>
  
  <pre><code>computer_id = something
  </code></pre>
  
  <p>which results in crashing the program using the config as it is not excepting that space.</p>