On 06/08/2010 02:23 PM, Farkas Levente 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.

I guess, you are talking about Fedora/RHEL, am I right? If so, it was bug in the bash-4.0 in those distributions. It was fixed and is working now as upstream bash.

Read the bash-faq E14. You can set the compat31 shopt. For more read the man page of bash - shopt builtin.

RR

Reply via email to