On Tue, 23 Jan 2007 11:04:58 -0500
Chet Ramey <[EMAIL PROTECTED]> wrote:

> One of the changes between bash-3.1 and bash-3.2 was to unify the
> handling of the pattern in the `==' and `=~' conditional command
> operators.  Pattern characters on the rhs are quoted to represent
> themselves (remove their special pattern meaning).  This is how ==
> has always worked.

I don't get this; I must be missing something.  If I do, in bash-3.1:

$ V="alphabet"
$ [[ $V == alphabet ]] && echo yes
yes
$ [[ $V == "alphabet" ]] && echo yes
yes
$ [[ $V == 'alphabet' ]] && echo yes
yes
$ [[ $V =~ alphabet ]] && echo yes
yes
$ [[ $V =~ "alphabet" ]] && echo yes
yes
$ [[ $V =~ 'alphabet' ]] && echo yes
yes
$

yet if I try the same in 3.2:

$ V="alphabet"
$ [[ $V == alphabet ]] && echo yes
yes
$ [[ $V == "alphabet" ]] && echo yes
yes
$ [[ $V == 'alphabet' ]] && echo yes
yes
$ [[ $V =~ alphabet ]] && echo yes
yes
$ [[ $V =~ "alphabet" ]] && echo yes
$ [[ $V =~ 'alphabet' ]] && echo yes
$

which to me looks like the two operators are not treating quotes the
same way.

-- 
Kevin F. Quinn

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to