13,420
edits
Changes
→KEY CONCEPTS
5
</span>
====EXIT & 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===