On 4/26/12 4:50 PM, Joseph Graham wrote: > Bash Version: 4.2 > Patch Level: 24 > Release Status: release > > Description: > Arrays defined in a function with declare -ag are not > available outside the function if an assignment is done with the > declaration, though it works if the assignment is done seperately from > the declaration. > > Repeat-By: > $ f() { declare -ag a=(my array); }; f; declare -p a > declare -a a='()' > $ f() { declare -ag a; a=(my array); }; f; declare -p a > declare -a a='([0]="my" [1]="array")'
http://lists.gnu.org/archive/html/help-bash/2012-04/msg00000.html -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/