Mail Archives: djgpp-workers/1999/04/08/06:24:10
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 -