delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/28/13:36:06

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Injected-Via-Gmane: http://gmane.org/
To: cygwin AT cygwin DOT com
From: Soren A <somian AT adelphia DOT net>
Subject: example needed pls: `cygpath -c <HANDLE>'
Date: Sat, 28 Jun 2003 17:34:51 +0000 (UTC)
Organization: Occasionally Sporadically
Lines: 54
Message-ID: <Xns93A88A37D41F9soren1Gmane@80.91.224.249>
X-Complaints-To: usenet AT main DOT gmane DOT org
User-Agent: Xnews/L5
X-Archive: encrypt

[posted and mailed]

Hi! The ever-fascinating "cygpath" tool once again beckons to me to plumb 
its depths ...

I am trying to finish a test script that uses ActivePerl to call `cygpath` 
from itself (a system call, by open()-ing a pipe to capture the output of 
the tool ...

  {... 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 ...}

 (troubled?: `perldoc open' or read the Camel 3rd Ed.;
  this is the new {$] >= 5.6.1} 3-argument form of open().)

I tried simple backticks too ;-). The point is that I get every indication 
by rigorously checking the return values of the calls to open(), close() 
and checking Perl built-in vars $! and $?, that the call to cygpath 
*worked*, but when I try to examine the string returned ($cygstyle_path), 
it is always empty!

So anyway, I am chasing all geese of any degree of domestication at this
point. I've tried searching in the several ways and cannot believe
no-one has asked before, but: please someone, provide an example of the
use of the "-c" flag to "cygpath", e.g. 

   cygpath -c <something> -u 'C:\\foo\\bar\fump.rey'

What values should "<something>" have? I do not really understand the 
manual explanation of what this flag is for. Could it help me here?

Any other insights also appreciated.

A couple of answers to anticipated questions from the idle
onlookers ;-) ... :

  * yeah,  am using AS Perl, that's because this is a piece of
    a WSH script.
  * what I'd like to end up with is a way to context|alternate-click
    on any filename in MSWindows Explorer and place the filename as
    *cygwin*, not the OS, will see it, on the clipboard. Anyone
    already had a pass at this wheel?

  Soren A.

-- 
"So, tell me, my little one-eyed one, on what poor, pitiful,
defenseless planet has my MONSTROSITY been unleashed?"
                       - Dr. Jumba, Disney's "Lilo & Stitch"
OpenPGP Key at http://savannah.gnu.org/people/viewgpg.php?user_id=6050


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019