On 06/25/2012 09:18 AM, Niels Carl W. Hansen wrote:
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
-DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL
-DHAVE_CONFIG_H -I. -I. -I./include -I./lib -D_GNU_SOURCE -DRECYCLES_PIDS
-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -fwrapv
uname output: Linux in 2.6.32-220.17.1.el6.x86_64 #1 SMP Wed May 16 00:01:37
BST 2012 x86_64 x86_64 x86_64 GNU/Linux
Machine Type: x86_64-redhat-linux-gnu
Bash Version: 4.1
Patch Level: 2
Release Status: release
Description:
[[ 'foobar' =~ 'o.a' ]] && echo FOUND
should print FOUND but it doesn't.
This have worked in previeous versions of bash.
The bash used comes with CentOS 6.2
Repeat-By:
No privous commands necessary to generate this problem.
Fix:
There is a bug in previous versions of bash in Fedora, RHEL and CentOS.
It means, in those distributions, bash versions up to 4.0 treats quoting
differently than upstream.
If you want to use the same quoting you have to enable compat31 shell
option.
RR