bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Bug-wget] execute external command only if download occurs with tim


From: Kamenik, Aleksander
Subject: RE: [Bug-wget] execute external command only if download occurs with time stamping
Date: Thu, 21 Oct 2010 11:14:20 +0100

> -----Original Message-----
> From: Micah Cowan [mailto:address@hidden 
> If you obtain the more recent release, 1.12, better handling of exit
> codes should allow you to use the && somescript.sh syntax, I think.

From 1.12 manual:

EXIT STATUS
       Wget may return one of several error codes if it encounters problems.

       0   No problems occurred.
       1   Generic error code.
       2   Parse error---for instance, when parsing command-line options, the 
.wgetrc or .netrc...
       3   File I/O error.
       4   Network failure.
       5   SSL verification failure.
       6   Username/password authentication failure.
       7   Protocol errors.
       8   Server issued an error response.

       With the exceptions of 0 and 1, the lower-numbered exit codes take 
precedence over higher-numbered ones, when multiple types of errors are 
encountered.

       In versions of Wget prior to 1.12, Wget's exit status tended to be 
unhelpful and inconsistent. Recursive downloads would virtually always return 0 
(success), regardless of any issues encountered, and non-recursive fetches
       only returned the status corresponding to the most recently-attempted 
download.


So wget -N always retuns 0 on success (tested 1.12 too). Success is both 
downloading a file and not downloading it due to current timestamp.


I guess I'll use the ugly method for now.


Regards,

Aleksander Kamenik
System Administrator
Krediidiinfo AS
an Experian Company
Phone: +372 665 9649
Email: address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]