R Kimber <[EMAIL PROTECTED]> writes: >> I agree that Wget should allow the caller to find out what >> happened, but I don't think exit codes can be of much use there. >> For one, they don't allow distinction between different >> "successful" conditions, which is a problem in many cases. > > I'm not sure I understand this. Why is it that there cannot be > different exit codes for different 'successful' conditions?
Because by Unix convention success is indicated by exit status 0. When a process exits with 0, scripts started with `sh -e' or tests such as `wget URL || exit $?' won't fail. Exiting with any non-zero exit status on success would cause spurious failures to be reported.