Um zu testen, ob Ihre Variable eine Zahl ist, siehe hier .
Ihre if
Aussage hat keine Bedingung ... Die richtige Syntax lautet:
if [ some_condition ] then # the code to execute if true (your `for` loop) else # the code to execute if false (optional) fi # "if" backwards