Subject: Re: [ -d ' ' ] && echo yes
From: Norton Allen <[email-masked]>
To: [email-masked] (Elfyn McBratney)
Cc: [email-masked], [email-masked]
Date: Mon, 3 Feb 2003 17:30:50 -0500 (est)

Elfyn McBratney wrote:
> 
> > Inasmuch as such a directory does not exist, this should
> > not give any output:
> >
> >   [ -d ' ' ] && echo yes
> >
> > I suspect this is not a feature of bash, but more deeply
> > buried, since
> >
> >   ls -ld ' '
> >
> > believes ' ' is a directory and
> 
> In a way it is. ' ' or '           ' no matter how many spaces is a loopback
> to the current directory AFAIK. If you try to cd to ' ' or '    ' you will
> see the pwd is /path/directory/you/are/in/.

Are you saying it's a feature? If so, a feature of cygwin or
of Windows? Under the Windows Command Prompt, cd " " does not
complain, and leaves you in the current directory as you
describe, but dir " " gives an error. This is certainly
not how it works under other OSes.

 -Norton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/