This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Filenames with spaces: very rare in Cygwin

On Thu, 15 Jan 2004 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


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).
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]