Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>MSYS <code>cygpath</code></h2> <h3>Program</h3> <p>This program convert a DOS path to a UNIX path and vice versa</p> <pre class="lang-perl prettyprint-override"><code>#!/bin/env perl # DOS to UNIX path conversion # © John S. Peterson. License GNU GPL 3. use strict; use Getopt::Std; # usage if ($#ARGV == -1) { print 'Usage: cygpath (-w) NAME... Convert Unix and Windows format paths Output type options: -w, --windows print Windows form of NAMEs (C:\WINNT) '; exit 0; } # option my %opt; getopts('w', \%opt); # convert path my @r; foreach my $e (@ARGV) { if ($opt{w}) { # add drive letter suffix $e =~ s,^\/([A-Za-z])\/,\1:\/,; $e =~ s,\/,\\,g; } else { $e =~ s,\\,\/,g; # add leading slash $e = "/$e"; # remove drive letter suffix $e =~ s,:,,; } push @r, $e; } print join("\n", @r); </code></pre> <h3>Compared to Cygwin <code>cygpath</code></h3> <p>The output from this program is better than the output from Cygwin <code>cygpath</code> in MSYS because</p> <ul> <li>Cygwin <code>cygpath</code> remove the Cygwin home from a converted path, f.e.</li> </ul> <pre><code>cygpath "$CYGWIN/usr/local/bin" /usr/local/bin </code></pre> <p>which is a problem because</p> <ul> <li>it's sometimes useful to convert a DOS Cygwin path to a UNIX path for the purpose of copying files from Cygwin to MSYS</li> </ul> <p>This program doesn't remove the Cygwin home</p> <pre><code>cygpath "$CYGWIN/usr/local/bin" /c/file/program/cygwin/usr/local/bin </code></pre> <h3>Compared to automatic MSYS path conversion</h3> <p>Manual path conversion has a use in MSYS because</p> <ul> <li>the automatic path conversion is inadequate</li> </ul> <p>for f.e.</p> <ul> <li><a href="https://github.com/mirror/dolphin-emu/pull/31" rel="nofollow">devkitPro <code>make</code></a></li> </ul>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload