SyntaxFix
Write A Post
Hire A Developer
Questions
Try the arithmetic-expression version of for:
for
max=10 for (( i=2; i <= $max; ++i )) do echo "$i" done
This is available in most versions of bash, and should be Bourne shell (sh) compatible also.