bug-bash
[Top][All Lists]
Advanced

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

Re: RFE: allow double quotes to group multi-words & be treated as 1 arg,


From: Andreas Schwab
Subject: Re: RFE: allow double quotes to group multi-words & be treated as 1 arg, w/DQ's stripped off -- including RH =~
Date: Wed, 04 Aug 2010 11:40:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Linda Walsh <bash@tlinx.org> writes:

> I would prefer this work:
>
> a="h."
>
> if [[ "hi" =~ "$a" ]];....

This works (both with and without compat31):

[[ "hi" =~ $a ]] && echo matches

(It doesn't matter how you quote the lhs, anyway.)

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]