I've got very simple array consisting of two elements. Now I want to go through this array in for loop and store elements in unique variables with different name. I'm trying something like this:
for i in ${!array[@]};
do
element$i=${array[$i]}
echo "$element{$i}"
done
But the result is error message
bash: element0=odm-eureka-cfg: command not found
bash: element1=github: command not found
What am I doing wrong?