I’m using variable variables in bash
like that:
foo="value"
bar="foo"
echo ${!bar}
But how can I make same thing on my embedded system which uses ash
shell?
I’m using variable variables in bash
like that:
foo="value"
bar="foo"
echo ${!bar}
But how can I make same thing on my embedded system which uses ash
shell?
It is possible with eval
command like this:
foo="value"
bar="foo"
eval result=\$$bar
echo $result