X-Spam-Check-By: sourceware.org
Message-ID: <45F07C61.91A9682B@dessent.net>
Date: Thu, 08 Mar 2007 13:13:05 -0800
From: Brian Dessent <brian@dessent.net>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: how do you create an usable path variable with a space in it?
References: <espqv3$i5t$1@sea.gmane.org>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Reply-To: cygwin@cygwin.com
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.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

Jerome Fong wrote:

> export JAVA_HOME='/cygdrive/c/Program\ Files/Java/jdk1.5.0_10'

This is wrong.  Either backslash-escape the space or use quotes, but not
both.  You are embedding an actual backslash in the value, which is not
what you want.  The purpose of the backslash is not to exist in the
value of the variable, but to tell the shell not to treat the space as
separating two arguments.

export FOO="some string"
export FOO=some\ string

Brian

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

