Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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" To: Subject: RE: cygpath -m (and -w) sometimes emits multi-line names Date: Sun, 20 Feb 2005 20:02:15 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit In-Reply-To: <20050220141724.I32136@links.magenta.com> Message-ID: 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/