On 9/9/16 7:44 AM, Vincent Lefevre wrote:
> On 2016-09-05 19:12:54 +0000, Mark Galeck wrote:
>> The standard says in the section 2.2.3 on Double-Quotes and $ :
>> "even number of unescaped double-quotes or single-quotes, if any,
>> shall occur".
> 
> Concerning this point, these even number of double-quotes and even
> number of single-quotes are fulfilled with the example below:
> 
>   echo "${foo-'a"b'"}"
> 
> But is this valid?

It's unspecified, so anything goes, as per

http://austingroupbugs.net/view.php?id=221

"For parameter expansions other than the four varieties that provide
for substring processing, within the string of characters from an
enclosed "${" to the matching '}', the double-quotes within which
the expansion occurs shall preserve the literal value of all
characters, with the exception of the characters double-quote,
backquote, <dollar-sign>, and <backslash>. If any unescaped
double-quote characters occur within the string, other than in
embedded command substitutions, the behavior is unspecified."

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to