bug-bash
[Top][All Lists]
Advanced

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

Re: =~ behaves differently in bash 3.2 and 3.0


From: Stephane CHAZELAS
Subject: Re: =~ behaves differently in bash 3.2 and 3.0
Date: Fri, 24 Oct 2008 11:16:01 +0000 (UTC)
User-agent: slrn/0.9.9 (Linux)

2008-10-24, 14:56(+08), Clark J. Wang:
> 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?

See question E14 in the bash FAQ.

-- 
Stéphane


reply via email to

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