On 19/02/2020 23.18, Ulrich Mueller wrote: > So, is there any syntax that allows to test if a value has been assigned > to the array variable? Especially, to distinguish VARNAME=() (empty > array) from VARNAME being unset?
Not `test` as such as we have just learned, but the returncode of `declare -p VARNAME` will be different for VARNAME being unset or being set to `()` or `""`. Add `&>/dev/null` to taste..! Peter