title: Using sed command how can I replace Linux path to Windows path
body: <p>I want to change the Linux path to a Windows Path, using "sed" command, for example:</p>
  
  <blockquote>
    <p>Linux path: <strong>/opt/test/dash/apps/tomcat</strong> to Windows Path:
    <strong>c:\\test\\dash\\apps\\tomcat</strong></p>
  </blockquote>
  
  <p>I tried with:</p>
  
  <pre><code>sed -i 's|'/opt/test/dash/apps/tomcat'|'c:\\\\\\\test\\\\\\\dash\\\\\\\apps\\\\\\\tomcat'|g' /filename - But no luck!!
  </code></pre>
  
  <p>What I exactly want all /opt/ should replace by c:\\ and rest of the "/" should be replace by "\\".</p>
  
  <p>NOTE: I am executing this command remotely using ssh2_exec, All "sed" commands are working except the above.</p>
  
  <p>Thanks in advance!!</p>