This KornShell Script (ksh):
envir=Dev
eval "${envir}foo=bar"
echo "$Devfoo"
Output:
bar
But I will not know what value is assigned to envir variable. So I want to do something like this where the output is the same as above:
envir=Dev
eval "${envir}foo=bar"
echo "${${envir}foo}"
Output:
${${envir}foo}: bad substitution
ksh --versionorwhat $(which ksh)--version: 0403-010 A specified flag is not valid for this command.Thewhat $(which ksh)command has a lot of output. Not sure what to look for.