[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bash 4.3 and 4.2 trouble with associative arrays assigned by ``printf -v
From: |
NBaH |
Subject: |
bash 4.3 and 4.2 trouble with associative arrays assigned by ``printf -v'' |
Date: |
Thu, 21 Nov 2013 19:03:56 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131103 Icedove/17.0.10 |
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
$
- bash 4.3 and 4.2 trouble with associative arrays assigned by ``printf -v'',
NBaH <=