Juergen Gohlke wrote:

Description:
If a command in $(...) contains a case-esac construction, the bash prints a syntax error instead
       of executing the code:
       bash: syntax error near unexpected token `;;'

In case you have trouble with code you need, use this workaround:

x=$(a=4; case $a in (3) echo a=3;; (4) echo a=4;; esac)

And yes, I've also seen this before and I thought it was fixed - maybe I thought of something else.

J.


Reply via email to