On 2/5/14 5:25 PM, Peggy Russell wrote:
>>> Description:
>>> declare -ia not enforced if variable is initiated using =
>>
>> Correct; bash applies the integer attribute after the variable assignment.
>> It has been this way since arrays were introduced (well, at least as far
>> back as bash-3.2; that's when I stopped looking).
>
> Perhaps documenting the behavior would be helpful. Maybe the last sentence
> to the declare help could say, "Attributes added with -a or -A do not take
> effect until subsequent assignments."
Thanks, good idea.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU [email protected] http://cnswww.cns.cwru.edu/~chet/