X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Content-class: urn:content-classes:message
MIME-Version: 1.0
Content-Type: text/plain; 	charset="us-ascii"
Subject: RE:  cygpath -u  doesn't seem to convert spaces properly
Date: Tue, 25 Sep 2007 18:29:08 -0500
Message-ID: <297343D29C14AA4D822142893ABEAEF303BEA771@srv1163ex1.flightsafety.com>
In-Reply-To: <fdc59a$ng5$1@sea.gmane.org>
From: "Thrall, Bryan" <bryan.thrall@flightsafety.com>
To: <cygwin@cygwin.com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Content-Transfer-Encoding: 8bit
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l8PNTKuo000832

Jerome Fong wrote on Tuesday, September 25, 2007 6:23 PM:
> I am trying to use cygpath -u to convert my windows path to an unix
> path in my shell script.  However, it has problems with paths that
> has spaces in it.  For example, "cygpath -u c:\Program Files\Java" is
> converted to /cygdrive/c/Program Files/Java, which doesn't work.  Is
> there a flag that I am missing?
> 
> I came up with the following, but it seems wrong.
> 
> $ cygpath -u "$(cygpath -m -s "c:\Program Files\Java")"
> /cygdrive/c/PROGRA~1/Java

WJFFM:

$ cygpath -u "c:\Program Files\Java"
/cygdrive/c/Program Files/Java
$ ls "/cygdrive/c/Program Files/Java"
j2re1.4.2  j2re1.4.2_04  jdk1.5.0_10  jre1.5.0  jre1.5.0_06
$ ls "`cygpath -u 'c:\Program Files\Java'`"
j2re1.4.2  j2re1.4.2_04  jdk1.5.0_10  jre1.5.0  jre1.5.0_06

Can you give specifics on how it doesn't work for you?
-- 
Bryan Thrall
FlightSafety International
Bryan.Thrall@flightsafety.com

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


