I tried below shell code to get the value of temp as "good 1" and "good 2", but I was not able to.
hello_1="good 1"
hello_2="good 2"
for i in 1 2
do
temp="hello_$i"
echo $temp
done
I want to fetch hello_1 and hello_2 variables value into temp variable.
I tried above script but I was not able to get values of hello_1 and hello_2 into temp. please help me.