Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 212346

Summary: app-shells/bash-3.2_p17-r1: binary operator =~ seems to not work in this version
Product: Gentoo Linux Reporter: konsolebox <konsolebox>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description konsolebox 2008-03-05 04:11:00 UTC
app-shells/bash-3.2_p17-r1

Bash operator =~ seems to not work properly in this version .. here are some of the commands i made:

# bash --version
GNU bash, version 3.2.17(1)-release (i686-pc-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

# [[ "1234" =~ "^[[:digit:]]+$" ]] && echo a
# [[ "1234" =~ "^[0-9]+$" ]] && echo a
# [[ "1234" =~ "^[[:digit:]]\+$" ]] && echo a
# [[ "1234" =~ "^[0-9]\+$" ]] && echo a

# shopt | grep glob
dotglob         off
extglob         off
failglob        off
nocaseglob      off
nullglob        off


Everything here made no output.. Please note that in other bash versions, I don't need to set extglob to on 

# bash --version
GNU bash, version 3.1.17(2)-release (i486-slackware-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.

# shopt | grep glob
dotglob         off
extglob         off
failglob        off
nocaseglob      off
nullglob        off

# [[ "1234" =~ "^[[:digit:]]+$" ]] && echo a
a


Reproducible: Always
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2008-03-05 07:39:09 UTC

*** This bug has been marked as a duplicate of bug 163527 ***