bug-bash
[Top][All Lists]
Advanced

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

Re: Empty array referenced by indirection reports unbound variable


From: Robert Elz
Subject: Re: Empty array referenced by indirection reports unbound variable
Date: Tue, 06 Apr 2021 22:28:04 +0700

    Date:        Tue, 6 Apr 2021 22:39:55 +0800
    From:        konsolebox <konsolebox@gmail.com>
    Message-ID:  
<CAJnmqwaBzBwZoVKvy_nv=kQ_7Z3HwnrhtJo2hMKqZZtx3pZdEQ@mail.gmail.com>

  | @ means everything or nothing. Unbound variable errors should not apply to 
it.

I know nothing about namerefs and arrays and stuff like that,
but did you consider the possibility that after

        array=()

then

        array[@]

is nothing, and so

        __ref=array[@]

is just

        __ref=

and consequently ${!__ref} is attempting to use '' as the name of a
variable?

kre




reply via email to

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