www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/1999/04/08/06:24:10

X-Authentication-Warning: acp3bf.physik.rwth-aachen.de: broeker owned process doing -bs
Date: Thu, 8 Apr 1999 12:23:34 +0200 (MET DST)
From: Hans-Bernhard Broeker <broeker AT physik DOT rwth-aachen DOT de>
X-Sender: broeker AT acp3bf
To: "'DJGPP workers'" <djgpp-workers AT delorie DOT com>
Subject: Re: regex question
In-Reply-To: <Pine.SUN.3.91.990406125338.16726M-100000@is>
Message-ID: <Pine.LNX.3.93.990408121303.200B-100000@acp3bf>
MIME-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 6 Apr 1999, Eli Zaretskii wrote:

> On Tue, 6 Apr 1999, Michel de Ruiter wrote:
> > An argument of `*/' matches directories *and* normal files.
> > An argument of `*/' _in Bash_ does *not* match normal files, only
> > directories.
[...]
> Does anybody know if the Bash behavior specific to Bash, or other Unix 
> shells return directories for */?

I just had a very quick look at some of the shells installed on a Solaris
2.5.1 box, and the behaviour is completely different for just about every
single one of them, it seems. I tested by giving the command 

	{shell name} -c 'echo */'

for each of them, in a directory that contains .a/ b/ (directories) and .c
and d (files). Here's the results (the login shell itself is zsh):

[syros] ~/tmp/tmp $ sh -c 'echo */'
*/
[syros] ~/tmp/tmp $ ksh -c 'echo */' 
b/
[syros] ~/tmp/tmp $ csh -c 'echo */' 
b/
[syros] ~/tmp/tmp $ tcsh -c 'echo */' 
b/ d/
[syros] ~/tmp/tmp $ zsh -c 'echo */' 
b
[syros] ~/tmp/tmp $ bash -c 'echo */' 
b/ d/
[syros] ~/tmp/tmp $ echo */
.a b

(Where the 'bash' used is version 1.12.1, a truly ancient one) Please note
the difference between direct execution of 'echo */' and the 'zsh -c'
invocation. I don't see why this happens. 

So, in a nutshell: no there is no 'accepted default behaviour' in this
case, it seems.

Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.

- Raw text -


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