hello,

Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-unknown-linux-gnu' -DCONF_VENDOR='unknown' -DLOCALEDIR='/home/nbah/share/locale' -DPACKAGE='bash' -DSHELL -DHAVE_CONFIG_H -DDEBUG -DMALLOC_DEBUG -I. -I. -I./include -I./lib -g -O2 uname output: Linux mymachine 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
Machine Type: x86_64-unknown-linux-gnu

Bash Version: 4.3
Patch Level: 0
Release Status: beta2

Description:
associative indexes don't appear when assigned by ``printf -v''
$ declare -A aa
$ printf -v "aa["ind1"]" "value 1"
$ printf -v "aa["ind2"]" "value 2"
$ printf '%s\n' "${!aa[@]}"

$

also :
Bash Version: 4.2
Patch Level: 37
Release Status: release
empty value in associative array when assigned by ``printf -v'' don't "assign" index
$ declare -A aa
$ printf -v "aa["ind1"]" "value 1"
$ printf -v "aa["ind2"]" ""
$ printf '%s\n' "${!aa[@]}"
ind1
$

Reply via email to