On Tue, 15 Jun 2010, Rainer Rehak wrote: > Hey there, > is it a bug, that the declaration of an associative array within a > function does not survive till after the function, with primitive > variables on the other hand that concept works well.
It's not a bug. It's an unfortunate side effect from 'declare' being a duplicate of the (non-standard) typeset builtin. If would be much more useful (and semantically accurate), if it just did what its name implies, and left the 'local' builtin for declaring variable local to a function. -- Chris F.A. Johnson, <http://cfajohnson.com> Author: Pro Bash Programming: Scripting the GNU/Linux Shell (2009, Apress) Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)