Open System Services Shell and Utilities Reference Manual (G06.28+, H06.05+)
continue(1) OSS Shell and Utilities Reference Manual
NAME
continue - Resumes a for, while, until, or select loop
SYNOPSIS
continue [n]
DESCRIPTION
The continue command resumes the next iteration of the enclosing for, while, until, or select
loop. If n is specified, resumes at the nth enclosing level.
EXAMPLES
1. The following shell script demonstrates the use of the continue command to resume a
loop:
forxin12345
do
if [ $x != 3 ]
then
print $x
else
continue
fi
done
EXIT VALUES
If an invalid argument is specified, the exit value is greater than 0 (zero).
NOTES
• Parameter assignment lists that precede the command remain in effect when the
command completes.
• I/O redirections are processed after parameter assignments.
• Errors cause a script that contains the commands so marked to abort.
The continue command is a shell built-in command. It differs from the regular com-
mands in that it does not open a new shell process when it executes.
A general discussion of shell built-in commands and a list of the OSS shell built-in com-
mands are in the reference page for sh(1).
RELATED INFORMATION
Commands: break(1), sh(1)..
2−70 Hewlett-Packard Company 527188-007