Search code examples
shellexit-code

Meaning of negative exit codes


While executing a shell script file, it throws -33 exit code

What does exit code=-33 refer to in shell script file execution.


Solution

  • Exit codes can only be 0-255. Any value outside this range simply wraps around:

    $ sh -c 'exit -33'; echo $?
    223
    

    Apart from zero vs non-zero, there is no standard meaning for any specific exit code.