|
From: | Roman Rakus |
Subject: | Re: =~ no longer working in bash-4.1 |
Date: | Tue, 08 Jun 2010 16:13:12 +0200 |
User-agent: | Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc11 Lightning/1.0b2pre Thunderbird/3.0.4 |
On 06/08/2010 02:23 PM, Farkas Levente wrote:
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.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.
Read the bash-faq E14. You can set the compat31 shopt. For more read the man page of bash - shopt builtin.
RR
[Prev in Thread] | Current Thread | [Next in Thread] |