$? variable in linux
$? Status of the previous process / command which ran on the shell
$ pwd
$ echo $? // returns 0 which means the previous command ran sucessfully
$ blahCommand
$echo $? // returns 1 which means the previous command failed
 
    