8.6.11.7 For Command

Syntax

for variable in list

commands

endfor

Description

The for command replaces variable with each object in list. It executes commands each time variable is replaced by an object in list. The objects in list are separated by white space. When commands have been executed using all the objects in list, control goes to the command following endfor.

For commands can be nested to any level. A for command can appear as a command within a for command.

The built-in for command is only available when built-in menu commands are enabled.

Example

for i in $a $b $c

echo $i

endfor