On Feb 14 2021, Robert Elz wrote:

>     Date:        Sat, 13 Feb 2021 23:21:36 +0300
>     From:        =?UTF-8?B?T8SfdXo=?= <oguzismailuy...@gmail.com>
>     Message-ID:  
> <CAH7i3LrrtgJSZWXFK_5zSNvTwTue9a9j7K=iC=lw2pbpecw...@mail.gmail.com>
>
>   |   $ bash -c ': $(case x in x) esac)'
>
> This is a well known bash deficiency.  When parsing command substitutions
> it (approximately) simply counts (unquoted) parentheses to find the end.
> Anything with a valid closing ')' but with no opening '(' confuses it.

Bash already handles that properly, when the compound-list is non-empty.

$ bash -c ': $(case x in x) :; esac)'

Andreas.

-- 
Andreas Schwab, sch...@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."

Reply via email to