bug-bash
[Top][All Lists]
Advanced

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

Re: array subscripts act differently for integers(ie. let)


From: Greg Wooledge
Subject: Re: array subscripts act differently for integers(ie. let)
Date: Mon, 16 Feb 2015 11:56:33 -0500
User-agent: Mutt/1.4.2.3i

On Mon, Feb 16, 2015 at 03:04:49AM +0100, emanuelczirai@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 string"
imadev:~$ let "ar[$idbad1]+=11"
imadev:~$ declare -p ar
declare -A ar='(["bad string"]="11" )'



reply via email to

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