diff --git a/pages/common/continue.md b/pages/common/continue.md new file mode 100644 index 0000000000..acae8ca0b0 --- /dev/null +++ b/pages/common/continue.md @@ -0,0 +1,12 @@ +# continue + +> Skip to the next iteration of a `for`, `while`, `until` or `select` loop. +> More information: . + +- Skip to the next iteration: + +`while :; do continue; echo "This will never be reached"; done` + +- Skip the next iteration from within a nested loop: + +`for i in {1..3}; do while :; do continue 2; done; done`