doublea1535
IS-IT--Management
I am trying to use the value of variable "var" as the name for a new variable in BASH. I am not getting it to work. Does anyone know if this can be done somehow?
$~ var=one
$~ echo $var
one
$~ ${var}=two
bash: one=two: command not found
$~ `echo $var`=two
bash: one=two: command not found
$~ $[var]=two
bash: 0=two: command not found
$~ {$var}=two
bash: {one}=two: command not found
$~ var=one
$~ echo $var
one
$~ ${var}=two
bash: one=two: command not found
$~ `echo $var`=two
bash: one=two: command not found
$~ $[var]=two
bash: 0=two: command not found
$~ {$var}=two
bash: {one}=two: command not found