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" <address@hidden> writes:

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

You missed the point.

Andreas.

-- 
Andreas Schwab, address@hidden
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]