Step 1/1: Exit and exit status

exit ends the shell or script; exit 3 sets the exit status to 3. 0 means success, anything else failure; $? holds the status of the last command.

$ exit 3
Fundamentalsexit
Choose the exit status
Exit a subshell with exit 6, then print the status with echo $?: (exit 6); echo $?
yesNext lesson:history