[Top][All Lists]

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

inconsistent treatment of arrays

From: agriffis
Subject: inconsistent treatment of arrays
Date: Tue, 7 Dec 2004 23:26:50 -0500

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-pc-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' 
-DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACKAGE='bash' -DSHELL 
-DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib   -march=athlon-xp -O3 -pipe
uname output: Linux time.flatmonk.org 2.6.8-gentoo-r4-kt600 #6 Fri Oct 15 
09:39:43 EDT 2004 i686 AMD Athlon(tm) XP 1800+ AuthenticAMD GNU/Linux
Machine Type: i686-pc-linux-gnu

Bash Version: 3.0
Patch Level: 13
Release Status: release

        Normally simple variables are treated as single element arrays
        when accessed as an array.  This doesn't work for substitutions.

        echo "${var[*]}"        => blah
        echo "address@hidden"   => blah
        echo "address@hidden//#/--}"    =>

        # Force recognition as array
        declare -a var
        echo "address@hidden//#/--}"    => --blah

reply via email to

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