This question already has an answer here:
- How to do indirect variable evaluation 5 answers
How can I reference a variable in bash based on another variable? Let me setup the example:
package="foobar" # the variable I wish to reference is $foobar_darwin_amd64 # thus trying: echo "$package_darwin_amd64"
But this does not work.