bug-bash
[Top][All Lists]
Advanced

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

nullglob breaks unset of arrays


From: mario . trentini_bb
Subject: nullglob breaks unset of arrays
Date: Wed, 24 Sep 2008 16:37:07 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

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 -Wall
uname output: Linux touchndie 2.6.18v1 #1 SMP Thu Sep 21 10:01:41 CEST 2006 
i686 GNU/Linux
Machine Type: i486-pc-linux-gnu

Bash Version: 3.2
Patch Level: 39
Release Status: release

Description:
        When nullglob option is enable (shopt -s nullglob), unset of an array
        does not work.

Repeat-By:
        my_array=(1 2 3 4 5 6)
        echo "Array ${my_array[@]}"
        shopt -u nullglob
        # remove first entry
        unset my_array[0]
        echo "Array ${my_array[@]}"
        shopt -s nullglob
        # remove first entry
        unset my_array[0]
        echo "Array ${my_array[@]}"





reply via email to

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