Running in some trouble using a variable with a number..
This works;
sourceid_2="blah"
echo $sourceid_2
But this doesnt work;
sourceid_2="blah"
i=2
echo $sourceid_$i
Any ideas how to fix this? I tried without the underscore.. but that didn't help.
My end goal is to do something with the variable in a for i in {2..7} loop.. like this;
for i in {2..7}
do
echo $sourceid_$i
done