zsh$ setopt printexitvalue
zsh$ grep '<title>' 0001.sgm
<title>Too Many Arguments for the Command Line</title>
zsh$ grep '<title>' 0000.sgm
grep: 0000.sgm: No such file or directory
zsh: exit 2 grep <title> 0000.sgm
zsh$ grep '<ttle>' 0001.sgm
zsh: exit 1 grep <ttle> 0001.sgm
tcsh% set printexitvalue
tcsh% true
tcsh% false
Exit 1