bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: chown and bash trashed part of system


From: Philip Rowlands
Subject: Re: chown and bash trashed part of system
Date: Wed, 31 Dec 2008 15:51:21 +0000 (GMT)
User-agent: Alpine 1.00 (DEB 882 2007-12-20)

On Wed, 31 Dec 2008, Vincent Chapman wrote:

I understand, but there are still incosistancies in the unix world of
shells.  Try this and you'll understand how one(I) could make this
mistake.

$ sudo bash echo .*
. .. .hidden_files

in zsh

$ sudo zsh echo .*
.hidden_files

This output is presumably fake, but I see your point.

zsh would not have accended into the parent directories.  Bash will.

zsh in a certain configuration will elide . and .. from the expansion of ".*". bash will also, in a certain configuration, elide . and .. - please see the docs for "dotglob" and "GLOBIGNORE".

A shell behaving in accordance with POSIX will follow the spec as to the expansion of ".*" and "*".


Cheers,
Phil




reply via email to

[Prev in Thread] Current Thread [Next in Thread]