Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

76 bytes added, 18 March
EXIT & BREAK STATEMENTS
''Example:''
<codespan style="font-family:courier;font-weight:bold">if [ $# -ne 1 ]<br>then<br>  echo "USAGE: $0 [arg]"<br>  exit 1<br>fi<br></codespan>>
<br>
'''<span style="font-family:courier;font-weight:bold;">break</span> Statement'''
''Example:''
<codespan 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></codespan>
<br><br>
13,017
edits

Navigation menu