Indirect variable expansion¶
${!varname} tells bash to:
- Get the value of 'varname'
- Use that value as the name of another variable to expand
Example:
This feature requires Bash 2.0 or later It won't work in standard sh or other shells
${!varname} tells bash to:
Example:
This feature requires Bash 2.0 or later It won't work in standard sh or other shells