On Mon, Jul 19, 2021, at 12:45 PM, Greg Wooledge wrote:
>
> > On Mon, Jul 19, 2021, 17:57 Greg Wooledge <greg@wooledge.org> wrote:
> > > In <https://lists.gnu.org/archive/html/bug-bash/2021-02/msg00189.html>
> > > Chet says that "The contents of (( are expanded as if they are between
> > > double quotes".
>
> On Mon, Jul 19, 2021 at 06:27:28PM +0200, Alex fxmbsw7 Ratchev wrote:
> > (( "2" + 4 ))
> > noerr
>
> Yes. Double quotes work. Single quotes don't. I believe this is
> because of what Chet said about the contents of (( being treated as
> if they're inside double quotes already.
The man page says that "[t]he expression is treated as if it were
within double quotes, but a double quote inside the parentheses is
not treated specially." Presumably that means that double quotes
are removed as usual. POSIX contains similar language.
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_06_04
--
vq