Pierre Gaston schrieb:
On 10/27/07, Bernd Eggink <[EMAIL PROTECTED]> wrote:
Pavel Gorshkov schrieb:

Description:
    Regexp matching seems to be broken since 3.2.0.
Repeat-By:
    The following used to work in bash-3.1:
      $ [[ test =~ 't.*t' ]]; echo $?
      1
It works without the quotes. Looks like they are taken literally instead of
being removed. I, too, f.think it's a bug, as according to  the docs, quote
removal should be performed on the words between [[ and ]].

The behavior changed with 3.2, from the NEWS file:

" Quoting the string argument to the [[ command's  =~ operator now forces
  string matching, as with the other pattern-matching operators."

Quoting removal is performed but [[ is not a normal command (it's a
shell keyword)

OK. While I don't consider this a good idea, at least the reference manual should be updated, which presently says:

"Word splitting and filename expansion are not performed on the words between the `[[' and `]]'; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution, _and quote removal_ are performed."

Regards,
Bernd


--
Bernd Eggink
[EMAIL PROTECTED]
http://sudrala.de


Reply via email to