Re: test whether array variable is set with ${parameter:+word}

2015-04-17 Thread Eduardo A . Bustamante López
This is not a bug. This is due to not understanding two aspects of bash: 1) $arrname is the same as ${arrname[0]} (not the "first" element, as what you seem to imply). Bash arrays are sparse, so you can define the element at index 1, without having an element at 0. 2) unset and empty is not

test whether array variable is set with ${parameter:+word}

2015-04-17 Thread pphick
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/b/home/share/locale' -DPACKAGE=