Doing Nothing
Occasionally you will write a script and need to insert a command to do nothing. The Null command (:) can be used to do this.
if [ -d dir1 ]
then
:
else
mkdir dir1
fi
Exiting a Script
You can use the exit command to exit a script. If you follow it with a number from 0 to 255, that will be the exit code for the script.