1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-08-22 01:23:59 +02:00
tldr/pages/common/continue.md

13 lines
409 B
Markdown
Raw Normal View History

2024-12-26 09:16:03 +02:00
# continue
> Skip to the next iteration of a `for`, `while`, `until` or `select` loop.
> More information: <https://www.gnu.org/software/bash/manual/bash.html#index-continue>.
- Skip to the next iteration:
`while :; do continue; {{echo "This will never be reached"}}; done`
2024-12-26 09:16:03 +02:00
2024-12-26 19:52:18 +02:00
- Skip to the next iteration from within a nested loop:
2024-12-26 09:16:03 +02:00
`for i in {{{1..3}}}; do {{echo $i}}; while :; do continue 2; done; done`