Configuration Information [Automatically generated, do not change]: Machine: i486 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i486' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i486-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -I. -I../bash -I../bash/include -I../bash/lib -g -O2 uname output: Linux tazzelwurm 2.6.14hcz1d #6 PREEMPT Thu Dec 8 11:56:38 CET 2005 i686 GNU/Linux Machine Type: i486-pc-linux-gnu
Bash Version: 3.1 Patch Level: 0 Release Status: release Description: The closing bracket in a case clause within a () subshell gets interpreted as the subshell's closing bracket. Repeat-By: #!/bin/bash x=$( case $(ls) in example) failsHere;; esac ) results in: /bashbug.sh: line 4: syntax error near unexpected token `;;' ./bashbug.sh: line 4: ` example) failsHere;;' Fix: move the offending code out into a function and call the function from the subshell. _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash