bug-bash
[Top][All Lists]
Advanced

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

Inconsitent treatment of * (globbing)


From: Pascal Wittmann
Subject: Inconsitent treatment of * (globbing)
Date: Sat, 29 Jan 2011 12:58:56 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101230 Lightning/1.0b2 Lanikai/3.1.7

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu'
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash'
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib   -march=i686
-mtune=generic -O2 -pipe
-DDEFAULT_PATH_VALUE='/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin'
-DSTANDARD_UTILS_PATH='/usr/bin:/bin:/usr/sbin:/sbin'
-DSYS_BASHRC='/etc/bash.bashrc' -DSYS_BASH_LOGOUT='/etc/bash.bash_logout'
uname output: Linux subiectiva 2.6.36-ARCH #1 SMP PREEMPT Mon Jan 24
18:34:55 UTC 2011 i686 Intel(R) Core(TM)2 Duo CPU T5670 @ 1.80GHz
GenuineIntel GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 4.1
Patch Level: 9
Release Status: release

Description:
  The way that "*" is treated for globbing is not consitent. Normaly a
regular expression "*"
  would match all characters, but for the sake of usability it doesn't
include the files
  which starts with a dot (dotfiles) and the file "..". This works
correctly in bash.

  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 result in a strange (and unexpected) behaviour, because you're
used to the behaviour
  of "*".

Repeat-By:
  Go in a directory where you have read rights for "../*" and then
execute the command
  "ls .*".



reply via email to

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