bug-bash
[Top][All Lists]
Advanced

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

extglob, @() format disfunctional


From: Ronald Hoogenboom
Subject: extglob, @() format disfunctional
Date: Sat, 18 Sep 2004 22:51:05 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i586; en-US; rv:1.4.1) Gecko/20031114

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: i386-redhat-linux-gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_FILE_OFFSET_BITS=64 -O2 -g -pipe -march=i386 -mcpu=i686 uname output: Linux speedy-k6.grundel 2.4.20-19.7 #1 Wed Mar 31 00:53:02 CEST 2004 i586 i586 i386 GNU/Linux
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
According to the man page, the extglob format @(pattern[|pattern..]) should match when exactly one of the pattern match. But in my experience, it matches when any of the patterns match (including multiple). Maybe the description is wrong and should be 'matches any of the patterns exactly one time'

Repeat-By:
        fi.:

shopt -s extglob
[[ ab/../ == @(ab|+([^/]))/..?(/) ]] && echo match

should not print match, because both 'ab' and '+([^/])' match on ab, but does.






reply via email to

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