bug-bash
[Top][All Lists]
Advanced

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

Re: RFE: request for quotes as grouping operators to work in brackets as


From: Andreas Schwab
Subject: Re: RFE: request for quotes as grouping operators to work in brackets as elsewhere.
Date: Sat, 18 Sep 2010 01:18:33 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Linda Walsh <bash@tlinx.org> writes:

>   Or another disparity:  C.
> t='one two three'
> c='one two three'
> 1) if [[ $t == $a ]]; then echo 'Matches'; fi
> 2) if [[ $t == "$a" ]]; then echo 'Matches'; fi
> So, the expressions match whether or not $a is in double quotes or not
> (single quotes would not match, as the $a would be taken literally).

Set a='one * three' and try again.

> Quoting should not disable RE matching.

Yes it should.  Just like quoting disables glob matching.  There must be
a way to remove the special meaning of a character.

> It is NOT the same as double quotes not allowing *file glob
> expansion*.

Globbing is not only about expansion, it is also about matching.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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