Changes

Jump to: navigation, search

Tutorial12: Shell Scripting - Part 2

394 bytes added, 07:46, 18 March 2021
KEY CONCEPTS
5
</span>
 
 
====EXIT &amp; BREAK STATEMENTS====
 
'''Exit Statement'''
 
The '''exit''' statement is used to '''terminate''' a shell script. �
This statement is very useful when combined with logic in a shell script. The exit command can contain an argument to provide the exit status of your shell script.�
 
''Example:�''
 
<pre>
if [ $# -ne 1 ]
then
  echo "USAGE: $0 [arg]"
  exit 1
fi
</pre>
 
 
===START-UP FILES===
13,420
edits

Navigation menu