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

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
Message-ID: <01f301c2cbd1$c5c969f0$696f86d9@webdev>
From: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>
To: "cygwin" <cygwin AT cygwin DOT com>, "Norton Allen" <allen AT huarp DOT harvard DOT edu>
References: <200302032126 DOT QAA22715 AT bottesini DOT harvard DOT edu>
Subject: Re: [ -d ' ' ] && echo yes
Date: Mon, 3 Feb 2003 22:15:33 -0000
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106

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


Regards,

Elfyn McBratney
elfyn AT exposure DOT org DOT uk
www.exposure.org.uk



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