> On Feb 14, 2021, at 3:00 PM, Oğuz <oguzismailuy...@gmail.com> wrote: > > 14 Şubat 2021 Pazar tarihinde Dale R. Worley <wor...@alum.mit.edu> yazdı: > >> Before we worry about what to change, I want to note that the original >> example is syntactically incorrect. The example is >> >> $ bash -c ': $(case x in x) esac)' >> >> But the manual page makes it clear that each case must be ended with >> ";;". > > > `;;' is optional for the last case item.
For reference: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_09_04_05 For comparison: % ksh -c ': $(case x in x) esac)'; echo $? 0 % zsh -c ': $(case x in x) esac)'; echo $? 0 % dash -c ': $(case x in x) esac)'; echo $? 0 % yash -c ': $(case x in x) esac)'; echo $? 0 % bash -c ': $(case x in x) esac)'; echo $? bash: -c: line 1: unexpected EOF while looking for matching `)' bash: -c: line 2: syntax error: unexpected end of file 2 vq