bug-bash
[Top][All Lists]
Advanced

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

Re: associative array assignment from the output of a function


From: Andreas Schwab
Subject: Re: associative array assignment from the output of a function
Date: Fri, 22 Oct 2010 18:07:35 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

"Chris F.A. Johnson" <chris@cfajohnson.com> writes:

> On Fri, 22 Oct 2010, Andreas Schwab wrote:
>
>> Axel <axel.azerty@laposte.net> writes:
>>
>>> After your answer, I checked and I think the error message is not
>>> related to the variable name collision :
>>>
>>> [axel@axel-asus plugins]$ unset foo
>>> [axel@axel-asus plugins]$ func()
>>>> {
>>>> echo "[a]=5 [b]=10"
>>>> }
>>> [axel@axel-asus plugins]$ declare -A foo=( $(func) )
>>
>> $ declare -A foo=('[a]=5')
>
>    Drop the qotes:

You missed the point.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



reply via email to

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