$? gets you to the exit code of the most recent command. 0 is good. Anything else > 0 is bad