wget: Exit Status

1 
1 2.13 Exit Status
1 ================
1 
1 Wget may return one of several error codes if it encounters problems.
1 
1 0
1      No problems occurred.
1 
1 1
1      Generic error code.
1 
1 2
1      Parse error—for instance, when parsing command-line options, the
1      ‘.wgetrc’ or ‘.netrc’...
1 
1 3
1      File I/O error.
1 
1 4
1      Network failure.
1 
1 5
1      SSL verification failure.
1 
1 6
1      Username/password authentication failure.
1 
1 7
1      Protocol errors.
1 
1 8
1      Server issued an error response.
1 
1    With the exceptions of 0 and 1, the lower-numbered exit codes take
1 precedence over higher-numbered ones, when multiple types of errors are
1 encountered.
1 
1    In versions of Wget prior to 1.12, Wget’s exit status tended to be
1 unhelpful and inconsistent.  Recursive downloads would virtually always
1 return 0 (success), regardless of any issues encountered, and
1 non-recursive fetches only returned the status corresponding to the most
1 recently-attempted download.
1