Exit Status Code of a Program on Unix / Linux
Depending on the shell you are using, you can find the exit status code of a program on Unix/Linux using
in bash
$?
or in csh,
$status
A non-zero exit code states that the program terminated with an error whereas an exit code of zero states that the program /script terminated normally.