I work in dash and I would like to know if there is any method to print variable with index of number of iteration.
CODE :
var1="a"
var2="b"
var3="c"
tmp=0
while [ $tmp -lt 4 ]
do
# this is how i imagine it
echo $('var'$tmp) #output should be value of var$tmp
tmp=$((tmp+1))
done
Thank you!