What does the variable "$?" expand to?
Expands to the last argument passed to a shell script or function call
Expands to the exit status of the most recently executed foreground command.
Expands to the number of arguments passed to a shell scripts or function call
Expands to the exit status of the most recently executed background command.