This is the mail archive of the
cygwin
mailing list for the Cygwin project.
RE: cygpath -m (and -w) sometimes emits multi-line names
- From: "Dave Korn" <dave dot korn at artimi dot com>
- To: <cygwin at cygwin dot com>
- Date: Sun, 20 Feb 2005 20:02:15 -0000
- Subject: RE: cygpath -m (and -w) sometimes emits multi-line names
> -----Original Message-----
> From: cygwin-owner On Behalf Of Raul Miller
> Sent: 20 February 2005 19:17
> Manipluating the result of cygpath -m with shell tools is needlessly
> difficult.
>
> $ pwd
> /cygdrive/c/Program Files/Mozilla Firefox/defaults/profile
> $ cygpath -m `pwd`/bookmarks.htm | sed 's} }%20}g; s}^}file:///}'
> file:///c:/Program
> file:///Files/Mozilla
> file:///Firefox/defaults/profile/bookmarks.htm
Hmm. What kind of output would you expect from the command
cygpath -m path1 path2 path3
? OK, then, so what kind of output would you expect from the command
cygpath -m /cygdrive/c/Program Files/Mozilla
Firefox/defaults/profile/bookmarks.htm
? In a unix shell, if you don't want a space to act as a command separator, you
have to quote it. Like this:
cygpath -m "/cygdrive/c/Program Files/Mozilla
Firefox/defaults/profile/bookmarks.htm"
So what kind of output would you expect from
cygpath -m "`pwd`/bookmarks.htm"
?
This is all bog-standard POSIX shell stuff. Any linux or unix will act the
same if you supply paths with spaces in as command-line arguments to an
executable, but 'doze systems have a much greater tendency to actually _have_
paths with spaces in them.
cheers,
DaveK
--
Can't think of a witty .sigline today....
--
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/