Reference Manual

NAME

for - command execution with substitution
SYNOPSIS
for var cmd $var ...

DESCRIPTION
Command for executes the specified command after substituting a settings variable for the $var placeholder.

Any settings variable can be used, including the ifn variable (current interface number), that has a set of property suffixes that can be evaluated instead of the variable itself.

NOTES
The current interface number ifn can be set with an ip ifn command or with the set command.
SEE ALSO
all, if, printf, set, while