First page Back Continue Last page Overview Graphics
Exit Status
One "char" of information is passed between Unix processes in the exit status field, which is used extensively by the shell. Zero is "successful" or true, nonzero is false, backwards from standard programming
- jeremy@jeremy ~ $ /bin/true
- jeremy@jeremy ~ $ echo $?
- 0
- jeremy@jeremy ~ $ /bin/false
- jeremy@jeremy ~ $ echo $?
- 1
Control structures use command exit status to determine flow.
"exit" command, as in C, exits your script with given status
Notes: