bug-bash
[Top][All Lists]
Advanced

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

array last member null, @ expansion bug?


From: Kid Pogi
Subject: array last member null, @ expansion bug?
Date: Mon, 5 Apr 2004 04:33:51 +0800
User-agent: KMail/1.6.1

Configuration Information [Automatically generated, do not change]:
Machine: i686
OS: linux-gnu
Compiler: i686-lsb-linux-gnu-gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-lsb-linux-gnu' 
-DCONF_VENDOR='lsb' -DSHELL -DHAVE_CONFIG_H  -I.  -I. -I./include -I./lib  
-O2 -march=i686
uname output: Linux adi 2.6.4 #1 Wed Mar 17 17:04:27 PHT 2004 i686 
GenuineIntel unknown GNU/Linux
Machine Type: i686-lsb-linux-gnu

Bash Version: 2.05b
Patch Level: 0
Release Status: release

Description:
        It seems that if the last member of an array is a null character, bash 
gets
        confused when expanding "@".  Characters following the output of 
${array[@]}
        are duplicated when echoed in certain circumstances. ie:

        $ a=('1' ''); echo "${a[@]}: "; echo "${a[*]}: "
        1 ::
        1 :
        $ echo "${a[@]}:: "; echo "${a[@]}::$"; echo "${a[@]}::>"
        1 ::::
        1 ::$
        1 :::>

Repeat-By:
        See Description.





reply via email to

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