Published
- 1 min read
Syntax error: Bad for loop variable
The solution for this is noted below
Syntax error: Bad for loop variable
Solution
#use
bash myscript.sh
#instead of
sh myscript.sh
#because for (( … )) is not available in sh only bash
Try other methods by searching on the site. That is if this doesn’t work