I would like to set a value via alias of it in bash, like following.
ORIGINAL_VALUE="a"
ALIAS="ORIGINAL_VALUE"
"$ALIAS"="b" # This line does not work.
echo "value is $ORIGINAL_VALUE"
The result I expect is
value is b
Now I know it is possible to read the value of ORIGINAL_VALUE via ALIAS by
${!ALIAS}
But, unfortunately, I don't know how to set the value of ORIGINAL_VALUE via ALIAS, like "$ALIAS"="b", which does not work.
Some who has a solution or a suggestion, please tell me it. Thank you very much.