I have below bash script
declare -a input=('alpha' 'beta' 'gama');
alpha="cow"
beta="goat"
gama="crow"
for i in "${input[@]}"
do
echo $(eval "echo $i") [this is wrong logic]
done
I want that when i iterates over the array it shall print cow,goat crow instead of alpha,beta and gama. How can i evaluate this some thing like $($i) where $i when evaluates to alpha,it sees it as $alpha and evaluates the same to cow.