delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/01/15/12:02:43

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Thu, 15 Jan 2004 12:02:40 -0500 (EST)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: fergus AT bonhard DOT uklinux DOT net
cc: cygwin AT cygwin DOT com
Subject: Re: Filenames with spaces: very rare in Cygwin
In-Reply-To: <000b01c3db63$4c975fe0$580210ac@tcgp.dundee.ac.uk>
Message-ID: <Pine.GSO.4.56.0401151157250.1497@slinky.cs.nyu.edu>
References: <000b01c3db63$4c975fe0$580210ac AT tcgp DOT dundee DOT ac DOT uk>
MIME-Version: 1.0

On Thu, 15 Jan 2004 fergus AT bonhard DOT uklinux DOT net wrote:

> In the entire Cygwin provision there are only 3 filenames containing spaces,
> all under /usr/ssl/man. Up until recently, I think there was only one, being
> /usr/local/ssl/man/man7/Modes\ of\ DES.7. The other two are under
> /usr/local/ssl/man/man3/.
> Nothing is broken, but this occurrence (just 3 in ~70,000) is possibly
> sufficiently rare to maybe merit attention and amendment? To, dunno,
> Modes_of_DES.7 and similar?
> This might break things, in which case obviously leave as is. Sorry for
> mentioning it. In any case, I ask for purely selfish reasons: the spaces
> screw up an otherwise rather neat script for fiddling about with +R and +S
> files when achieving a portable version of Cygwin on CD.
> Fergus

Fergus,

FWIW, space is a valid filename character on both Unix and Windows.  This
means that any script that assumes filenames to be space-free (and lacking
other shell special characters) is, IMO, broken.  Cygwin seems to be one
platform where this issue bites people with great regularity, but there's
no reason why this can't happen on Unix (and probably will with the advent
of file managers like Nautilus from Gnome).  The bottom line is, even if
these files get fixed, there are no guarantees this won't bite you again
some time in the future.  FWIW, you can easily accomodate quotable
characters (spaces and such) in your scripts (I've been advocating this in
Cygwin scripts for a while now).  The two tricks I can recommend are 'eval
"set -- $QUOTEDARGLIST"' and using non-standard values of IFS.  I have
scripts with samples of both of these approaches, which I can send you on
request (I've posted some of them to the Cygwin lists, too).
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

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