help-bash
[Top][All Lists]
Advanced

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

Re: How does quote removal work with alternative forms of parameter expa


From: Chet Ramey
Subject: Re: How does quote removal work with alternative forms of parameter expansion?
Date: Wed, 29 May 2024 16:47:06 -0400
User-agent: Mozilla Thunderbird

On 5/26/24 8:00 PM, Lawrence Velázquez wrote:



x="${1:-'$bar'}"  |  bash x.sh ""   |   'expanded'  => why not quote
removal, why expansion?

I don't know.  Bourne compatibility, perhaps.

Because when using that form of expansion, they are affected by the
enclosing double quotes and single quotes are not special in a double-
quoted string.


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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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