CONTINUE(1P)
π CONTINUE(1P) β POSIX Programmer's Manual π
okay bestie, welcome to the glow-up of continue, from the POSIX Programmer's Manual. sit down, grab a strawberry π, because we're about to make loop control actually make sense.
πΈ PROLOG πΈ
so like, a lil heads up before we get into it: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ β so if you're on Linux, go check the corresponding Linux manual page for the real tea on Linux behavior β. or honestly? the interface might not even be implemented on Linux at all. vibe check accordingly. π«Ά
β¨ NAME β¨
continue β the "skip to the next round of the loop" queen. she continues for, while, or until loops. periodt. π
π SYNOPSIS π
continue [n]
π¦ DESCRIPTION π¦
okay so here's the whole deal:
if n is specified, the continue utility shall return to the top of the *n*th enclosing for, while, or until loop. if n is not specified, continue shall behave as if n was specified as 1. π
and what does "returning to the top of the loop" even mean? bestie it means: repeating the condition list of a while or until loop, or performing the next assignment of a for loop, and re-executing the loop if appropriate. she's not just skipping β she's going all the way back up. π₯
the value of n is a positive decimal integer. if n is greater than the number of enclosing loops, the outermost enclosing loop shall be used. and if there is no enclosing loop at all? the behavior is unspecified. π not a vibe, just don't.
the meaning of "enclosing" shall be as specified in the description of the break utility. (go read your girl break's page, they're a matched set π)
π OPTIONS π
None. she has no flags, she has no options, she simply is. iconic behavior honestly.
π OPERANDS π
See the DESCRIPTION. yes, that's it. that's the whole section. go back up. π
β STDIN β
Not used. she doesn't read from you, bestie.
π§ INPUT FILES π§
None.
π ENVIRONMENT VARIABLES π
None. no environment variables here, she's low maintenance fr fr.
πΈ ASYNCHRONOUS EVENTS πΈ
Default.
β¨ STDOUT β¨
Not used. not a single peep on stdout.
π STDERR π
the standard error shall be used only for diagnostic messages. so if she's talking, something went wrong. π
π¦ OUTPUT FILES π¦
None.
π EXTENDED DESCRIPTION π
None. nothing extra, she's already perfect.
π₯ EXIT STATUS π₯
0β Successful completion. slay. π>0β thenvalue was not an unsigned decimal integer greater than or equal to1. so basically you gave her bad input and she's letting you know. π
π CONSEQUENCES OF ERRORS π
Default.
the following sections are informative. (aka: the fun part, keep reading π«Ά)
β APPLICATION USAGE β
None.
π EXAMPLES π
here's her moment, the actual example, verbatim, no cap:
for i in *
do
if test -d "$i"
then continue
fi
printf '"%s" is not a directory.\n' "$i"
done
see what she's doing? if $i is a directory, continue says "nope, next one" and skips the printf. only non-directories get printed. main character energy, honestly. π
π§ RATIONALE π§
None.
π FUTURE DIRECTIONS π
None.
π SEE ALSO π
- Section 2.14, Special Built-In Utilities
πΈ COPYRIGHT πΈ
okay this part is the serious part, so let's do it properly:
portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. in the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. the original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. to report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page bestie π«Ά this iconic lil doc came to you from IEEE/The Open Group, 2017 β CONTINUE(1P), that's the manual, that's the date, and that's a wrap. now go skip some loop iterations. you got this. πβ¨ππ¦
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms