for command

Loops through a block of commands according to a counter.

All Usages Examples

See also: foreach, while

Usages

  1. for variable = start to end [step inc] ... end

Loops over the instructions between the for and end statements, incrementing the given variable at the end of each loop.

Examples

for i = 1 to 3
    echo $i
end
for i = 1 to 100 step 3
    echo $i
end