help-bash
[Top][All Lists]
Advanced

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

Re: backslash difference between ` and $(


From: Lawrence Velázquez
Subject: Re: backslash difference between ` and $(
Date: Fri, 27 Dec 2024 00:00:59 -0500

Something always comes to mind right after sending...

On Thu, Dec 26, 2024, at 11:48 PM, Lawrence Velázquez wrote:
> The comparison to eval "...\..." becomes even more apt when `...\...`
> occurs within double quotes.  The good news is that the double quotes
> don't add Yet Another Interpretation Pass; the bad news is that the
> existing pass now recognizes all the escape sequences for double
> quotes, including '\"', '\<LF>', and '\!' when history expansion is
> enabled.

This unfortunately implies another situation in which a simple
assignment is affected by whether its RHS is quoted or not.

        $ foo=`echo -E '\"'`
        $ bar="`echo -E '\"'`"
        $ printf '%s\n' "$foo" "$bar"
        \"
        "

-- 
vq



reply via email to

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