10.0;next, revision 1.0, 88/01/21
next -- Return to the top of a loop.
usage: next
DESCRIPTION
next interrupts the flow of control in a shell loop construct (for,
select, and while). When next is encountered in a for or while loop,
control passes back to the top of the loop (see EXAMPLES below). When
next is encountered in a select loop, control passes to the next case
clause. This is useful when you have specified select oneof but want to
test multiple things under certain circumstances.
You may terminate the flow of control in a loop by using the exit
command. See the exit command description for more information.
The next command requires no arguments or options.
EXAMPLES
Consider the following section from a shell script:
n := 0
while ((^n < 10))
do read -type integer n
if ((^n < 10)) then next endif
args ^n
enddo
As long as the read command reads integers into variable n that are less
than 10, the next command executes and causes the script to return to the
top of the while loop. When the value of n is greater than or equal to
10, the script prints the number then leaves the while loop and continues
execution.
For more information on variables, refer to the manual, Using Your Aegis
Environment.
SEE ALSO
More information is available. Type
help exit For information on exit
help for For information on for loops
help select For information on select loops
help while For information on while loops