I want to retrieve specific variable values depending on 'prod' or 'dev' environment, without chaining lots of if-else blocks with the same content.
Therefore, I have the variables like this:
prod_key=daksjhdkjasd
dev_key=kajsdnaskldk
I want to evaluate the correct key in some way like this:
env=prod
key=${env}_key
Of course I've tried the above and it didn't work, just replaced the 'env' variable. (I'm using dash (/bin/sh))