java exit code
Contents
The number is only the status code for the termination of the JVM. It does not effect the actual command. By convention 0 means a normal exit, anything else signifies an abnormal termination.
To get a handle no the exit status, the env variable "$?" is the return status of the last command. So try this:
bash$ cat "SOME_FILE_THAT_DOES_NOT_EXIST"
bash$ echo $? and your result should be 1.
bash$ cat "SOME_FILE_THAT_DOES_EXIST"
bash$ echo $? and your result should be 0.
hope this helps,
cludwin
Author w1100n
LastMod 2015-12-30