On Fri, Oct 06, 2006 at 11:55:27AM +0200, [EMAIL PROTECTED] wrote:
[...]
> Repeat-By:
> 
>         $ echo $(
>         >   case a in
>         >     1) :;;
>         bash: syntax error near unexpected token `;;'
> 
>         The closing `)' is misinterpreted as being the end of the `$('
>         substitution, instead of being recognized as element of the
>         case block which it is part of.
[...]

It's a known limitation also in zsh and some versions of ksh.

Use

$(
  case a in
    (1) ;;
  esac
)

instead.

-- 
Stephane


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to