delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2007/02/09/10:16:38

X-Spam-Check-By: sourceware.org
Subject: RE: Re: stupid spaces in environment vars
Date: Fri, 9 Feb 2007 15:15:28 -0000
MIME-Version: 1.0
Message-ID: <84952F09F3FC0C418393E60D116EB9CC126C47@Traf-Mail.int.ascribe.com>
From: "Phil Betts" <Phil DOT Betts AT ascribe DOT com>
To: <david DOT bear AT asu DOT edu>, <cygwin AT cygwin DOT com>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l19FGQV4009745

David Bear wrote on Friday, February 09, 2007 4:56 AM::
> Okay, the problem is in quoting in shell scripts, I think.

It is.  It's not a Windows problem and it certainly isn't a
cygwin problem.

Although spaces occur more often in Windows than on other 
platforms, they can and do occur on Unix/Linux for example. 
Any properly written shell script must be written with the
assumption that a path contains spaces.  If they aren't, at 
best they are broken, at worst they are a security risk.

If you're going to write shell scripts, learn to do it right.
Learn the quotation rules, by which I mean both knowing what
they are and UNDERSTAND them.

Windows is only making you more aware of the issues because
so many important paths include spaces.  (Quite why anyone
would *want* to create a path with spaces in it, particularly
important paths, is beyond me, but then MS does a lot of dumb
things)

-- 
Phil

  Linux: enough rope to hang yourself
Windows: a ready made noose conveniently placed around your neck

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


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019