I have a question about something similar to this question, but I need to call global variable depending on local one.
Say I want to pass either test, staging, or production as a variable to a script, I might do something like this:
#!/bin/bash
env=$1
export ENV_$env=some_param
echo $ENV_${env}
But the global variable seem not be retrieved at all:
# ./script.sh test
test
The use case for this script is to have provide isolation for processes to work in parallel.