title: How to escape colon and double slash in shell script?
body: <p>I am writing shell script to replace a line a file which has an URI.I am getting error in using URI.</p>
  
  <p>Line to be placed:</p>
  
  <pre><code>   source 'http://rubygems.org'
  </code></pre>
  
  <p>My script:</p>
  
  <pre><code>   #sed -i '1s/.*/  source 'https://rubygems.org' /' /Gemfile
  </code></pre>
  
  <p>It is not able to identify single quote.</p>
  
  <p>Error i am getting: <strong>"sed: -e expression #1, char 23: unknown option to `s'"</strong></p>