2011-11-2, 12:01(-06), unkn...@vmw-les.eng.vmware.com:
[...]
> Description:
>       If {varname} is an assoc. array in a redirection the exec will fail
>       The [] should not be confused with pathname expansion just like ${}.
>
> Repeat-By:
>       $ declare -A array
>       $ exec {array[key]}<file
[...]

In the documentation, it's {VARNAME}<file, so bash works as
documented.

zsh doesn't support {array[key]}<file either.

ksh does though it's not documented (documented the same as
bash).

The work around is easy though:

$ declare -A array
$ exec {var}<file
$ array[key]=$var

-- 
Stephane


Reply via email to