title: Keep spaces when using sed command in kornshell script
body: <p>I'm having some trouble with the sed command :<br/><br/>
  I'd like to replace in a string, a single quote by two single quote
  <br/>Here's my string :</p>
  
  <pre><code>04CA07807800106109XE00187200000081960          NI         0780643442        178'0700
  </code></pre>
  
  <p>I used this sed command to replace the single quote :</p>
  
  <pre><code>line=`echo $line | sed "s/'/''/g"`
  </code></pre>
  
  <p>The result is</p>
  
  <pre><code>04CA07807800106109XE00187200000081960 NI 0780643442 178''0700
  </code></pre>
  
  <p>As you can see, the single quote is properly replaced by two single quotes.<br/>
  But I lost all the spaces between each character of my string and I really need to keep them.</p>
  
  <p>Is there a way to keep those spaces with the sed command ? <br/>
  I tried with a tr command and i got the same result.</p>
  
  <p>Thank you for your help.</p>