The "exit" command causes an immediate return from a script. An integer return code may be set and later accessed using the $? pseudo variable. When no parameter is given, a code of 0 is returned.
When the "exit" command is used on the command line, it cancels all processing and sets the specified return code.