Indirect variable
Variable Substitution
I had an issue where I want to substitute a variable with another variable value (example below):
DIRLIST="OCT XML GUIDES WEBSERVICES TRAVELBOUND XSLT DSE"
for i in $DIRLIST
do
for y in ${!i}
do
echo $y
done;
done;
This would make "y" equal to variable name called $OCT, $XML, $GUIDES etc..... this magic is done by:
${!VARNAME}