bug-bash
[Top][All Lists]
Advanced

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

Re: bug with getting an array index or ...


From: konsolebox
Subject: Re: bug with getting an array index or ...
Date: Sun, 6 Dec 2015 23:18:20 +0800

On Sun, Dec 6, 2015 at 9:38 PM, shawn wilson <ag4ve.us@gmail.com> wrote:
> declare -a array=(aaaaaaaa bbbbbbbb cccccccc); echo "${!array[@]}";
> echo "${!array[@]:-}"
>
> also, "${!array[@]:foo}" and :+foo and :-foo are all empty as well -
> I'm pretty sure this is not intended?
>
${!name[@]:-word}, ${!name[@]:+word}, and ${!name[@]:offset:length}
are not explicitly documented as valid forms of parameter expansion,
and never has been.

If you do that in bash 4.4, you'll get a bad substitution error message.



reply via email to

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