title: How to format a Windows path to a Unix path on Cygwin command line
body: <p>When using Cygwin, I frequently copy a Windows path and manually edit all of the slashes to Unix format.  For example, if I am using Cygwin and need to change directory I enter: </p>
  
  <pre><code>cd C:\windows\path 
  </code></pre>
  
  <p>then edit this to</p>
  
  <pre><code>cd C:/windows/path  
  </code></pre>
  
  <p>(Typically, the path is much longer than that).  Is there a way to use sed, or something else to do this automatically?  For example, I tried:</p>
  
  <pre><code>echo C:\windows\path|sed 's|\\|g'  
  </code></pre>
  
  <p>but got the following error  </p>
  
  <pre><code>sed: -e expression #1, char 7: unterminated `s' command
  </code></pre>
  
  <p>My goal is to reduce the typing, so maybe I could write a program which I could call.  Ideally I would type:</p>
  
  <pre><code>conversionScript cd C:/windows/path 
  </code></pre>
  
  <p>and this would be equivalent to typing:</p>
  
  <pre><code>cd C:\windows\path
  </code></pre>