Re: Should nested case statements within command substitutions work on in bash 3.2.x?

2015-03-21 Thread Chris F.A. Johnson
On Sun, 22 Mar 2015, Jon Seymour wrote: I was surprised that this didn't work with the OSX version of bash 3.2: /bin/bash -c 'echo $(case "yes" in yes) echo yes; ;; no) echo no; ;; esac)' /bin/bash: -c: line 0: syntax error near unexpected token `;;' /bin/bash: -c: line 0: `echo $(case "ye

Re: Should nested case statements within command substitutions work on in bash 3.2.x?

2015-03-21 Thread Jon Seymour
Thanks for reply and the workaround. jon. On Sun, Mar 22, 2015 at 4:49 PM, Chris F.A. Johnson wrote: > On Sun, 22 Mar 2015, Jon Seymour wrote: > >> I was surprised that this didn't work with the OSX version of bash 3.2: >> >> /bin/bash -c 'echo $(case "yes" in yes) echo yes; ;; no) echo no;

Re: Should nested case statements within command substitutions work on in bash 3.2.x?

2015-03-21 Thread Bob Proulx
Jon Seymour wrote: > I was surprised that this didn't work with the OSX version of bash 3.2: > > /bin/bash -c 'echo $(case "yes" in yes) echo yes; ;; no) echo no; ;; > esac)' > > /bin/bash: -c: line 0: syntax error near unexpected token `;;' > /bin/bash: -c: line 0: `echo $(case "yes" in ye

Should nested case statements within command substitutions work on in bash 3.2.x?

2015-03-21 Thread Jon Seymour
I was surprised that this didn't work with the OSX version of bash 3.2: /bin/bash -c 'echo $(case "yes" in yes) echo yes; ;; no) echo no; ;; esac)' /bin/bash: -c: line 0: syntax error near unexpected token `;;' /bin/bash: -c: line 0: `echo $(case "yes" in yes) echo yes; ;; no) echo no; ;; es