The 'exit' command allows you to stop a running shell script at
any point and to return a "status" value back to whomever called
the shell script. This is a very common practice with shell
scripts; sometimes you want to stop the script before it gets to
the end of the shell script (for various logic reasons).
The 'exit' command also allows you to give a status that any
other calling process can use to determine if the shell script
ended successfully or not.