Lars Wilke wrote:
Hi,
first this is not a real bug and is more like a wishlist item.
So the problem:
When invoking wget to retrieve a file via ftp all is fine
if the file exists and wget is able to retrieve it. The return
code from wget is 0. If the file is not found on the server the
return code is 1. Good.
I expected that wget would behave the same when using file globbing.
If the file can be found via a pattern and can be downloaded
wget returns with 0. But if the file can not be found after
successfully retrieving a directory listing wget returns with 0, too!
IMHO here wget should exit with the same error code (1) as above.
I searched the docs if this behaviour is mentioned somewhere but
have not found it mentioned. Therefor i am sending this email.
Sorry if i missed this detail mentioned somewehere.
hi lars,
unfortunately one of wget's weak points is its lack of consistency for
the returned error codes. after the release of wget 1.11, i am planning
some major architectural change for wget. that will be the best time to
redesign the code which handles returned error values.
--
Aequam memento rebus in arduis servare mentem...
Mauro Tortonesi http://www.tortonesi.com
University of Ferrara - Dept. of Eng. http://www.ing.unife.it
GNU Wget - HTTP/FTP file retrieval tool http://www.gnu.org/software/wget
Deep Space 6 - IPv6 for Linux http://www.deepspace6.net
Ferrara Linux User Group http://www.ferrara.linux.it