I am trying to print the values of a variable which has naming sequentially in bash.
boxes1=abcd boxes2=efgh boxes3=ijkl
for (( i=1; i<=$boxCount; i++ ));
do
echo "\$$boxes{i}"
done
I want output like: abcd efgh ijkl
I am trying to print the values of a variable which has naming sequentially in bash.
boxes1=abcd boxes2=efgh boxes3=ijkl
for (( i=1; i<=$boxCount; i++ ));
do
echo "\$$boxes{i}"
done
I want output like: abcd efgh ijkl