On Sat, Jan 29, 2011 at 12:58:56PM +0100, Pascal Wittmann wrote:
>   But if I use the expression ".*" in bash, I would expect from the
> behaviour of "*", that
>   ".*" don't include the file "..". But the fact is, that it does in bash.

This is done for compatibility with all the other shells.  If you want
to get different behavior, try playing with bash's GLOBIGNORE variable:

$ cd /tmp
$ sh -c 'echo .*'
. .. .AgentSockets .dcs.37dd79 .dcs.dcgtlock .dcs.trc1 .dcs.trc2 .dcs.utillock 
.mutt-imadev-16849-121.swp .x11start
$ bash -c 'echo .*'
. .AgentSockets .dcs.37dd79 .dcs.dcgtlock .dcs.trc1 .dcs.trc2 .dcs.utillock 
.mutt-imadev-16849-121.swp .x11start ..
$ bash -c 'GLOBIGNORE=.:..; echo .*'
.AgentSockets .dcs.37dd79 .dcs.dcgtlock .dcs.trc1 .dcs.trc2 .dcs.utillock 
.mutt-imadev-16849-121.swp .x11start

Reply via email to