Exit from a
until , or
If n is supplied, the nth enclosing loop is exited. n must be greater than or equal to 1.The return status is zero unless n is not greater than or equal to 1.
for myloop in 1 2 3 4 5 do echo -n "$myloop" if [ "$myloop" -eq 3 ] then break # This line will break out of the loop fi done
break is a POSIX `special' builtin
Related Results :
- For & While Loops
- Installing PHP in Linux
- Loop Constructs & Control
- Linux Basics
- SCP and SSH Remote Linux
- Create your own commands in linux
- bind bash
- Related Posts are generally User Blog posts.
- or Other tutorials from other networks of w3clan.com.
- Any registered user can create related posts based on search term tags.