Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $ # here everything is still normal
- $ bash -c 'exit 1';echo $?
- 1
- $ bash -c 'exit 255';echo $?
- 255
- $ zsh -c 'exit 255';echo $?
- 255
- $ # now it get's crazy
- $ bash -c 'exit 256';echo $?
- 0
- $ zsh -c 'exit 256';echo $?
- 0
- $ # (leaving away zsh for now, it is always reproducible with both)
- $ bash -c 'exit 257';echo $?
- 1
- $ bash -c 'exit 267';echo $?
- 11
- exit [n]
- Cause the shell to exit with a status of n. If n is omitted,
- the exit status is that of the last command executed. A trap on
- EXIT is executed before the shell terminates.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement