X-Recipient: archive-cygwin@delorie.com
X-Spam-Check-By: sourceware.org
Date: Mon, 11 Feb 2008 21:26:47 +0100
From: Corinna Vinschen <corinna-cygwin@cygwin.com>
To: cygwin@cygwin.com
Subject: Re: whitespace in variables (tsch)
Message-ID: <20080211202647.GA28164@calimero.vinschen.de>
Reply-To: cygwin@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
References: <d5050b380802111159v7f363300ibd7fa1348b66b710@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <d5050b380802111159v7f363300ibd7fa1348b66b710@mail.gmail.com>
User-Agent: Mutt/1.5.16 (2007-06-09)
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

On Feb 11 11:59, Christopher Stack wrote:
> first time cygwin user and im running into a problem when setting
> location variables on a pc.  since the pc uses whitespace (like
> c:/Program Files), setting a variable as a direction to this location
> seems impossible.  how do you get tsch to parse the variable properly?
>  i've been searching google for the past two days and can't find a
> solution.  it would seem other should have run into this previously,
> no?
> 
> and yes, please i've already heard all the arguments against
> programming in csh and if i knew bash i'd use it.  thanks in advance
> for not being *that* person.

The secret buzzword is "quoting".  In every shell.  On every OS.
This is not Cygwin specific.  I typed the below in a tcsh on Linux.

  tcsh$ cd /tmp
  tcsh$ mkdir foo\ bar
  tcsh$ setenv DIR "foo bar"
  tcsh$ cd $DIR
  cd: Too many arguments.
  tcsh$ cd "$DIR"
  tcsh$ pwd
  /tmp/foo bar


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat

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

