help-bash
[Top][All Lists]
Advanced

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

Re: Bash: A Question


From: Chet Ramey
Subject: Re: Bash: A Question
Date: Wed, 3 Jun 2020 09:00:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.8.1

On 6/3/20 1:49 AM, Lord Sam wrote:

> It would appear that, for every four backslashes added around *"hello"* (that
> is, four on each side), the output alternates between adding *""* around
> the output expression (and keeping the amount of *\* in the output the
> same), or adding an additional *\* to the output expression (and removing
> the *""* around the output).
> 
> Why does this occur?

Because `` processing strips backslashes before certain characters, but not
others, before passing the command to a subshell, where it is parsed and
executed.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_03

details which characters are special.

-- 
``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/



reply via email to

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