bug-bash
[Top][All Lists]
Advanced

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

=~ behaves differently in bash 3.2 and 3.0


From: Clark J. Wang
Subject: =~ behaves differently in bash 3.2 and 3.0
Date: Fri, 24 Oct 2008 14:56:56 +0800

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?


reply via email to

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