Skip to content
Related Articles
Get the best out of our app
GFG App
Open App
geeksforgeeks
Browser
Continue

Related Articles

break command in Linux with examples

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

break command is used to terminate the execution of for loop, while loop and until loop. It can also take one parameter i.e.[N]. Here n is the number of nested loops to break. The default number is 1.

Syntax:

break [n]

Example 1: Using break statement in for loop

Example 2: Using break statement in while loop

Example 3: Using break statement in until loop

break –help : It displays help information.

My Personal Notes arrow_drop_up
Last Updated : 15 May, 2019
Like Article
Save Article
Similar Reads
Related Tutorials