delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/01/29/10:06:45

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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 29 Jan 2003 10:05:58 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: Randall R Schulz <rrschulz AT cris DOT com>
cc: cygwin AT cygwin DOT com
Subject: Re: cygwin path problems
In-Reply-To: <5.2.0.9.2.20030128222650.0a9174b8@pop3.cris.com>
Message-ID: <Pine.GSO.4.44.0301290942410.24195-100000@slinky.cs.nyu.edu>
Importance: Normal
MIME-Version: 1.0

Randall,

On Tue, 28 Jan 2003, Randall R Schulz wrote:

> Igor, Soren,
>
> At 16:36 2003-01-28, Igor Pechtchanski wrote:
> >On Tue, 28 Jan 2003, Soren A wrote:
> >
> > > ...
> > >
> > > Or re-invent that wheel, your choice ;-)
> > >   Soren A
> >
> >Why, one doesn't have to be a "cygpath" guru at all!  A little judicious
> >application of sed, and you can turn a space-separated path into a
> >colon-separated one. Which reduces the problem to the one already
> >solved... ;-)
> >
> >Seriously, though, you could use something like
> >     "`/bin/ls /cdv/D/goodies/babe*.jpg | cygpath -w -f -`"
> >as the argument.  This should expand all the files.
>
> Did you try that? It doesn't work for me.

Yes, I did try it.  I think the problem might be with the extra quotes
around the `` construct, and there are issues with quoting paths with
spaces properly, but on the whole it does work:

$ echo `/bin/ls /bin/ch* | cygpath -w -f -`
C:\cygwin\bin\chgrp.exe C:\cygwin\bin\chmod.exe C:\cygwin\bin\chown.exe C:\cygwin\bin\chroot.exe
$ cygpath --version
cygpath (cygwin) 1.25
Path Conversion Utility
Copyright 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
Compiled on Nov 22 2002

> For one thing, I see no indication in cygpath's "--help" output that an
> argument of "-" tells it to read a name or names to convert from
> standard input.

$ cygpath --help
Usage: cygpath (-d|-m|-u|-w|-t TYPE) [-c HANDLE] [-f FILE] [options] NAME
       cygpath [-ADHPSW]
[snip]
Other options:
  -f, --file FILE       read FILE for input; use - to read from STDIN
                                             ^^^^^^^^^^^^^^^^^^^^^^^^^
  -o, --option          read options from FILE as well (for use with --file)
[snip]

> Nor will cygpath process multiple files (on the command line) in a
> single invocation (as you seem to suggest below).
>
> >It would certainly be a good idea to add multiple filename capability to
> >cygpath. If I have time over the next week, I'll submit a patch.
> >     Igor

Note that I suggested *adding* such a capability...

> And for this case and many similarly simple ones, "tr" will do.
>   Randall Schulz

We all have our favorite tools ;-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.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