Does SH support indirect expansion like BASH?

Hello,

is there a kind soul who can answer me, does the SH support double substitution known as indirect expansion similar to BASH? The syntax for bash is ${!var}.

For instance in bash I can write something like this:

VAR="value"
REF_VAR="VAR"
echo ${!REF_VAR}

and get the "value" output. Is there a way to acheive this in SH?

If no is there a workaround on it?

Thank you.

Which sh? They're not all the same.

If your shell doesn't support ${!...} then you'll have to use the eval hack.

VAR2=asdf
VAR1=VAR2
eval echo \$$VAR1