Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

4 bytes added, 07:58, 18 March 2021
EXIT & BREAK STATEMENTS
Although the loop terminates, the shell script will continue running.
''Example:''<br>
<span style="font-family:courier;font-weight:bold">read -p "Enter a number: " number<br>while [ $number -ne 5 ]<br>do<br>   read -p "Try again. Enter a number: " number<br>   if [ $number -eq 5 ]<br>   then<br>     break<br>
   fi<br>done<br></span>
13,420
edits

Navigation menu