Already reported:
* test -v: http://lists.gnu.org/archive/html/bug-bash/2014-11/msg00099.html
* declare -p arrname:
https://lists.gnu.org/archive/html/bug-bash/2012-11/msg00084.html
Hello all,
I have found a problem with the declare builtin.
Patch Level: 33
Release Status: release
Description:
Apparently, there is a problem with how bash interprets some
variable assignments.
It only happens in a function (probably related to `declare'
making variables local)
Oh I see, I had no idea that's how it's meant to work. My apologies.
However this case still doesn't work, but maybe I should use single
quotes all the time?:
this fails(double quotes):
$ declare -A ar
$ idbad2="["
$ let "ar[$idbad2]+=11"
bash: let: ar[[]+=11: bad array subscript (error token
On Mon, Feb 16, 2015 at 03:04:49AM +0100, emanuelczi...@cryptolab.net wrote:
> Description:
> when dealing with integer operations(let, ++), "bad array subscript"
> errors
> can happen because subscripts get unquoted (and evaluated even though they
> are in single quotes); unlike what happen
On Mon, Feb 16, 2015 at 03:04:49AM +0100, emanuelczi...@cryptolab.net wrote:
> please see attached bash script to reproduce because that explains
> it much better than I could in words.
The argument you give to let should be quoted.
imadev:~$ declare -A ar
imadev:~$ idbad1="bad strin
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='/usr/share/loc