www.delorie.com/archives/browse.cgi | search |
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 |
Message-ID: | <4310E0A2.639626CA@dessent.net> |
Date: | Sat, 27 Aug 2005 14:52:34 -0700 |
From: | Brian Dessent <brian AT dessent DOT net> |
MIME-Version: | 1.0 |
To: | cygwin AT cygwin DOT com |
Subject: | Re: Spaces in Environment Variables |
References: | <20050827213817 DOT 79719 DOT qmail AT web52805 DOT mail DOT yahoo DOT com> |
X-IsSubscribed: | yes |
Reply-To: | cygwin AT cygwin DOT com |
Jesse Hogan wrote: > $ PF="/cygdrive/c/Program\ Files" > $ export PF > $ cd $PF > : cd: /cygdrive/c/Program\: No such file or directory > $ ls $PF > ls: /cygdrive/c/Program\: No such file or directory > ls: Files: No such file or directory You are simultaneously overquoting and underquoting. When you assign a value to PF you need to use either quotes or backslash-escapes, but not both. When you 'cd' you need to quote the argument if it contains spaces. $ export PF="/cygdrive/c/Program Files" $ cd "$PF" 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |