bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: =~ no longer working in bash-4.1


From: Pierre Gaston
Subject: Re: =~ no longer working in bash-4.1
Date: Tue, 8 Jun 2010 17:07:15 +0300

On Tue, Jun 8, 2010 at 3:23 PM, Farkas Levente <lfarkas@lfarkas.org> 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 4.0, but it gives "outside" in 4.1.
> imho it's a serious changes since all shell script will fail which use
> =~ :-(
> is there any reason for this? or any quick fixes?
> thanks in advance.
> regards.
>
> --
>  Levente                               "Si vis pacem para bellum!"
>
> if [[ "abc" =~ abc.* ]];

The pattern should not be quoted since bash 3.2, I doubt it works in 4.0.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]