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 --version
orwhat $(which ksh)
– glenn jackman Jul 28 at 17:56--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. – javaPlease42 Jul 28 at 17:58