bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

case statement breaks $( ) substitution


From: hcz
Subject: case statement breaks $( ) substitution
Date: Fri, 06 Oct 2006 11:55:27 +0200

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.18b #2 PREEMPT Thu Sep 28 23:52:58 CEST 2006 
i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.1
Patch Level: 17
Release Status: release

Description:
        case statement breaks $( ) substitution

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.

Fix: 
        None so far.  The case clause could be moved into a function
        which can be called instead-

        This bug has been reported several times during the last 2-3
        years.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]