On 6/27/15 3:48 PM, Nathan Neulinger wrote: > Bash Version: 4.3 > Patch Level: 39 > Release Status: release > > Description: > > If $() includes a case statement nested within it, the parser is > not matching ) as closing the case, > but rather the $(. This behavior is different between bash and > other shells. ksh/busybox > both process this without error, but I do not know which is > officially "correct".
Thanks for the report. This is a bug in bash that will be fixed in the next version. I have attached a patch for people to test. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/
*** ../bash-4.3-patched/parse.y 2015-05-18 19:27:05.000000000 -0400 --- parse.y 2015-06-29 10:59:27.000000000 -0400 *************** *** 3709,3712 **** --- 3748,3753 ---- tflags |= LEX_INWORD; lex_wlen = 0; + if (tflags & LEX_RESWDOK) + lex_rwlen = 0; } }