On 9/3/07, Andreas Kohlbach <[EMAIL PROTECTED]> wrote: > Hi, > > though the man page of wget mentions .netrc, I assume this is a bug. > > For my understanding if you provide a --user=user and --password=password > at the command line this should overwrite any setting elsewhere, as in > the .netrc. It doesn't. And it took me quite some time and bothering > other guys to realise that it seems wget is ignoring --user and > --password at the command line if a .netrc exists with the matching > content.
Indeed. Whether this is a bug or not needs some discussion, I think, but here's a patch to fix your problem. Index: src/netrc.c =================================================================== --- src/netrc.c (revision 2376) +++ src/netrc.c (working copy) @@ -59,6 +59,7 @@ search_netrc (const char *host, const char **acc, const char **passwd, int slack_default) { + if (strlen(opt.user) && strlen(opt.passwd)) return; acc_t *l; static int processed_netrc;