delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/02/20/15:02:26

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
From: "Dave Korn" <dave DOT korn AT artimi DOT com>
To: <cygwin AT cygwin DOT com>
Subject: RE: cygpath -m (and -w) sometimes emits multi-line names
Date: Sun, 20 Feb 2005 20:02:15 -0000
MIME-Version: 1.0
In-Reply-To: <20050220141724.I32136@links.magenta.com>
Message-ID: <SERRANOqCMNc4J5yaiQ0000000f@SERRANO.CAM.ARTIMI.COM>
X-OriginalArrivalTime: 20 Feb 2005 20:02:15.0989 (UTC) FILETIME=[13306650:01C51787]

> -----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/

- Raw text -


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