Re: building arrays from non array variables using 'array[${#arr...@]}]='

2010-01-26 Thread Chet Ramey
On 1/25/10 6:58 AM, Mart Frauenlob wrote: > As i came up with this i have to go further ;) ,so i installed bash > 4.1.2 and your new patch and ran tests again with it and 3.1.17, 4.0.35 > versions. > Patch seems to be working for return values of '${#arr...@]}'. > But ${!arr...@]} returns 0 on the

Re: building arrays from non array variables using 'array[${#arr...@]}]='

2010-01-25 Thread Mart Frauenlob
On 24.01.2010 21:19, Chet Ramey wrote: > On 1/24/10 5:13 AM, Mart Frauenlob wrote: >> Hello, >> >> I'd like to ask, if the behavior of indexed array assignment using the >> form: 'array[${#arr...@]}]=' is as expected. > > Thanks for the report. The question is what ${#arr...@]} should return > wh

Re: building arrays from non array variables using 'array[${#arr...@]}]='

2010-01-24 Thread Chet Ramey
On 1/24/10 5:13 AM, Mart Frauenlob wrote: > Hello, > > I'd like to ask, if the behavior of indexed array assignment using the > form: 'array[${#arr...@]}]=' is as expected. Thanks for the report. The question is what ${#arr...@]} should return when it refers to a scalar variable that has not bee

building arrays from non array variables using 'array[${#arr...@]}]='

2010-01-24 Thread Mart Frauenlob
Hello, I'd like to ask, if the behavior of indexed array assignment using the form: 'array[${#arr...@]}]=' is as expected. I tested bash versions 3.1.17 and 4.0.35. Using v3.1 an explicitly declared non array variable (global or local) results in an empty array[0] entry. Using v4.0 the explicitly