On Thu, Jul 19, 2018 at 2:44 PM konsolebox wrote:
> On Wed, Jul 18, 2018 at 5:19 AM, Grisha Levit wrote:
> > $ set -u; unset var; f() { test -v 'var[0]'; echo $?; }; var[0]=X f
> > 0
> > -bash: var[0]: unbound variable
>
> I'm not getting this error. What version of bash are you using?
Sorry
On Wed, Jul 18, 2018 at 5:19 AM, Grisha Levit wrote:
> $ set -u; unset var; f() { test -v 'var[0]'; echo $?; }; var[0]=X f
> 0
> -bash: var[0]: unbound variable
I'm not getting this error. What version of bash are you using?
--
konsolebox
On 7/17/18 5:19 PM, Grisha Levit wrote:
> When there is a variable with a name that includes a subscript in the
> environment, test -v looks at that variable rather than an array with
> that subscript.
Even though bash needs to do a better job to segregate environment
variables with invalid
When there is a variable with a name that includes a subscript in the
environment, test -v looks at that variable rather than an array with
that subscript.
I just posted about two ways [1] [2] to create variables like
`var[0]=X' and if both of those methods are fixed than this report
might be