In bash 3.0.14, the condition [[ file.txt =~ .*\\.txt\$ ]] returns TRUE but in 3.2.39 it returns FALSE. But with the shopt option `compat31' set it also returns TRUE. Is that reasonable? In the bash manual, `compat31' makes sense only for quoted patterns. The string .*\\.txt\$ is considered to be quoted?
- =~ behaves differently in bash 3.2 and 3.0 Clark J. Wang
- Re: =~ behaves differently in bash 3.2 and 3.0 Bernd Eggink
- Re: =~ behaves differently in bash 3.2 and 3.0 Chet Ramey
- Re: =~ behaves differently in bash 3.2 and 3.0 Clark J. Wang
- Re: =~ behaves differently in bash 3.2 and 3.0 Stephane CHAZELAS