Break and Continue Statement in Linux

The Break and Continue statement in Linux system

Break Statement

The Break statement in usedĀ  to terminate the execution of the entire loop, after completing the execution of all of the line of code up to the Break statement. It them steps down to the code following the end of the loop.
The Break command can also be used to exit from a nested loop using this format: break n

Continue statement

The continue statement is slimier to the Break command, except that it causes the current iteration of the loop to exit, rather then the entire loop. This statement is useful when an error has accursed but you want to try to execute the next iteration of the loop.
Like with the break statement. TheĀ Continue can also be used to continue from a nested loop using this format: continue n