bug-bash
[Top][All Lists]
Advanced

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

eval complains about array syntax valid in bash-3.0.16


From: Markus . Schwarzenberg
Subject: eval complains about array syntax valid in bash-3.0.16
Date: Mon, 13 Feb 2006 10:33:01 +0100 (MET)

Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.8
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' 
-DCONF_OSTYPE='solaris2.8' -DCONF_MACHTYPE='sparc-sun-solaris2.8' 
-DCONF_VENDOR='sun' -DLOCALEDIR='/sw/opensrc/gnu/share/locale' -DPACKAGE='bash' 
-DSHELL -DHAVE_CONFIG_H   -I.  -I. -I./include -I./lib  
-I/sw/opensrc/gnu/include -I/sw/opensrc/include -I/sw/opensrc/include/freetype2 
-I/usr/local/ssl/include -O6
uname output: SunOS suni2 5.8 Generic_117350-24 sun4u sparc SUNW,Sun-Blade-2500
Machine Type: sparc-sun-solaris2.8

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

Description:
        Assigning arrays using
                testvar=( $(echo A) $(echo B) )
        is accepted in bash-3.1.0. However, using the
        same in an eval-construct
                eval testvar=( $(echo A) $(echo B) )
        is rejected:
          bash: syntax error near unexpected token `('
        This behavior is different in bash-3.0.16, where the eval statement is 
accepted.
        I'm not shure whether that's a real bug or 3.0.16 was too tolerant.
        

Repeat-By:
        eval testvar=( $(echo A) $(echo B) )

Fix:
        Workaround:
        eval testvar="(" $(echo A) $(echo B) ")"




reply via email to

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