I am trying to get the array in the while-loop and need to update the value in array too.
Below is my code what I have tried. I get this error [0: command not found
#!/bin/bash
i=0
while [$i -le "{#myarray[@]}" ]
do
echo "Welcome $i times"
i= $(($i+1)))
done
How do I fix this?