On Sun, 09 Dec 2007 21:13:32 +0100 Hrvoje Niksic wrote: > > I disagree again. If wget did not download a file, no matter what > > the reason, then it should not exit with zero. I have written > > several scripts that utilize wget to download files. Because wget > > fails to issue a useful code upon completion, I am forced to use > > hacks to find out what actually transpired. Curl utilizes certain > > error codes, # 73 for instance, that are quite useful. > > 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? A program can exit under various conditions, some of which might be situations in which errors occurred and some might be situations in which no errors occurred but different things happened. Having exit codes to indicate what actually happened seems eminently desirable, and it's unclear to me why it is not possible. - Richard. -- Richard Kimber http://www.psr.keele.ac.uk/
