FRUIT could be "APPLE" or "BANANA"
And fruit's colors are defined as follows:
APPLE_COLOR=red
BANANA_COLOR=yellow
In a shell, I want to print "red" or "yellow" based on the value of FRUIT. How can I do that?
echo ${"${FRUIT}_COLOR"}
This gives me -bash: ${"${FRUIT}_COLOR"}: bad substitution