On Tue, Apr 27, 2010 at 07:52:25AM +0400, Andrey Chernov wrote:
> Just wonder, do you have plans to implement ${!variable} sometimes?
> This bashism is very useful:
...
While we're on this topic, I'll mention the bashism I'd like to see
support for -- array variables.
Older versions supported only one-dimensional numeric indicies.
http://tldp.org/LDP/abs/html/arrays.html
foo[1]=abc
foo[2]=def
echo ${foo[1]} ${foo[2]}
Bash 4 adds associative arrays.
foo[bar]=ghi
foo[baz]=jkl
echo ${foo[bar]} ${foo[baz]}
echo ${foo[*]}
-Ed