This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: example needed pls: `cygpath -c <HANDLE>'

On Sun, Jun 29, 2003 at 12:17:01PM +0200, Gerrit P. Haase wrote:
> Hallo Soren,

> you also wrote:
> > I am trying to finish a test script that uses ActivePerl to call `cygpath`
> >   {... stuff ...}
> >   open(CTH, '-|', "C:/cygwin/bin/cygpath $MS_path_filename")
> >     or die "Could not open() call to 'cygpath', what is up?";
> >   $cygstyle_path = <CTH>;
> >   chomp $cygstyle_path;
> >   {... stuff ...}
> #!/bin/perl
> $MS_path_filename = 'H:\bin';
> $MS_path_filename = quotemeta($MS_path_filename);
> open(CTH, '-|', "H:/bin/cygpath $MS_path_filename")
>   or die "Could not open() call to 'cygpath', what is up?";
> $cygstyle_path = <CTH>;
> chomp $cygstyle_path;
> print "$cygstyle_path\n";

 {Gerrit's output}
> $ /bin/
> /bin

> What is the problem?

See my original message please! What I was asking for was an explanation
of the cygpath flag -c <HANDLE>.

I know the code above works, it ran for me too. First of all you aren't
reproducing the conditions of the test: NOT CygPerl, but Win32Perl (AS
Perl); secondly NOT on the console/terminal commandline but in a WSH
script (the code is executed when the "hooks" built in to WSH which know
how to call AS Perl, do so); and lastly I am not asking for readers to
reproduce the test (because it might be onerous to do so, because
they've never used WSH or don't have AS Perl installed, but if someone
does have a system which meets those criteria I'd be mightily obliged if
they would try).

I am just trying to understand what it might be about "cygpath" that it
cannot output anything under *these* conditions. Or find out whatever
there is to find out.

Thanks Gerrit!
   Soren A.

See my OpenPGP key at
GnuPG public key fingerprint  | "Only when efforts to reform society have as
 BD26 A5D8 D781 C96B 9936     |  their point of departure the reformation of
 310F 0573 A3D9 4E24 4EA6     |  the inner life -- human revolution -- will
they lead us with certainty to a world of lasting peace and true human security."
                                -- Daisaku Ikeda

Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]