Shouting the return code. (Re: Meaning of "rc" in cron/log)

Felix Lee flee at gondor.cs.psu.edu
Tue Jun 28 21:08:37 AEST 1988


Does ksh let you put the return code in the prompt? Something like
PS1='($?) '?  Showing only non-zero return codes would be better.

Return codes are interesting.  Really.  IBM's VM/CMS will tell you about
non-zero return codes.  (The prompt is either 'R;' or 'R(nnn);')

Unix hides return codes well.  Ever try unconfusing someone about why
"true" is "exit 0", but "false" is "exit 1"?

Maybe if the shell shouted the return code, more programs would return
interesting codes.  (lament) Where are the return codes for fsck
documented?  Why does "strings" return -40?  Why does "od" return 10?
--
Felix Lee	flee at gondor.cs.psu.edu	*!psuvax1!gondor!flee



More information about the Comp.unix.questions mailing list