delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/02/03/17:20:00

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
From: Norton Allen <allen AT huarp DOT harvard DOT edu>
Message-Id: <200302032230.RAA01491@bottesini.harvard.edu>
Subject: Re: [ -d ' ' ] && echo yes
To: elfyn-cygwin AT exposure DOT org DOT uk (Elfyn McBratney)
Date: Mon, 3 Feb 2003 17:30:50 -0500 (est)
Cc: cygwin AT cygwin DOT com, allen AT huarp DOT harvard DOT edu
In-Reply-To: <01f301c2cbd1$c5c969f0$696f86d9@webdev> from "Elfyn McBratney" at Feb 3, 3 10:15:33 pm
MIME-Version: 1.0

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/

- Raw text -


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