continue

Resume the next iteration of an enclosing for, while, until, or select loop.

SYNTAX
 continue [n]

If n is supplied, the execution of the nth enclosing loop is resumed. n must be greater than or equal to 1. The return status is zero unless n is not greater than or equal to 1.

This is a BASH shell builtin, to display your local syntax from the bash prompt type: help continue

Examples

for myloop in 1 2 3 4 5 
do 
 if [ "$myloop" -eq 3 ] 
 then 
 continue # Skip rest of this particular loop iteration.
 fi
 echo -n "$myloop"
done

continue is a POSIX 'special' builtin

"We are American at puberty. We die French" ~ Evelyn Waugh

Related Linux commands

break - Exit from a loop.
for
- Expand words, and execute commands.
if - Conditionally perform a command.
until - Execute commands (until error).
while - Execute commands.

(追記) (追記ここまで)
Copyright © 1999-2026 SS64.com
Some rights reserved

AltStyle によって変換されたページ (->オリジナル) /