bug-bash
[Top][All Lists]
Advanced

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

local undefined array expands to ASCII 127 instead of nothing.


From: Christophe Martin
Subject: local undefined array expands to ASCII 127 instead of nothing.
Date: Mon, 28 May 2007 13:17:30 +0200
User-agent: Thunderbird 2.0.0.0 (Macintosh/20070326)

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 gnap 2.6.15-28-686 #1 SMP PREEMPT Thu May 10 09:56:30 UTC 
2007 i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

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

Description:
        Hello,

        When referencing local array "${uninitialized[*]}" within a
        function, an ASCII 127 appears instead of nothing iff
        ${uninitialized[*]} is double-quoted and followed by something, as
        in "${uninitialized[*]}foo"

        The problem also occurs with 3.2.0(1)-release (home built, same arch)

        Christophe

Repeat-By:
        toto() {
                typeset x
                echo "${x[*]} "
        }
        toto | od -c

        produces
        
        0000000 177      \n
        0000003

        instead of :
        
        0000000      \n
        0000002





reply via email to

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