This is the mail archive of the cygwin@cygwin.com 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]

[ -d ' ' ] && echo yes


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

  ls -la ' '

will give you 'total 0' (no . or .. entries).
It also believes any name consisting of all spaces is
a directory.

On the plus side, you can't create a real directory or
file named ' ', because it thinks one already exists.

  -Norton Allen
  

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


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