in f13 =~ no longer working in bash

David Michael fedora.dm0 at
Tue Jun 8 12:29:20 UTC 2010

On Tue, Jun 8, 2010 at 8:14 AM, Farkas Levente <lfarkas at> wrote:
> hi,
> =~ no longer working in bash. just try this little line:
> -----------------------------
> if [[ "abc" =~ "abc.*" ]]; then echo inside; else echo outside; fi
> -----------------------------
> this give "inside" up to fedora-12, but it gives
> "outside" in fedora-13.
> imho it's a serious changes since all shell script will fail which use
> =~ :-(
> is there any reason for this? or any quick fixes?

Try removing the quotes from the regular expression, or at least the
asterisk.  Alternatively, you can use something like `grep -Eq "abc.*"
<<< abc` for extended regular expressions with the expected
quoted-token behavior.

More information about the devel mailing list