bug-bash
[Top][All Lists]
Advanced

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

Re: Question about case statement in Bash docs


From: Chet Ramey
Subject: Re: Question about case statement in Bash docs
Date: Mon, 10 May 2021 10:56:22 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 5/10/21 10:40 AM, Andreas Schwab wrote:
On Mai 10 2021, Chet Ramey wrote:

Either way, quote removal happens, the double quotes are removed, and
the characters between the double quotes are treated specially.

POSIX doesn't mention quote removal either.  Is that a bug?  There is
the parenthetical remark "(which also describes the effect of quoting
parts of the pattern)" which suggests that quote removal is indeed not
needed.

https://www.austingroupbugs.net/view.php?id=985

There are some intricate hoops to jump through to reconcile that the
quoted pattern matches and that double quotes have no special meaning
for pattern matches. The shell has to arrange for the double-quoted
characters to be treated as quoted by the pattern matcher while removing
the literal double quotes.

If you want to read a ferocious argument about quoting and shell pattern
matching, look at

https://www.austingroupbugs.net/view.php?id=1234

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