[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-wget] How to disable reading or settings in .wgetrc?
From: |
Tim Rühsen |
Subject: |
Re: [Bug-wget] How to disable reading or settings in .wgetrc? |
Date: |
Fri, 2 Jun 2017 09:47:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
Hi Linda,
On 05/31/2017 11:17 PM, L A Walsh wrote:
> I notice in the manpage, where it talks about the exclude list,
> how it says the syntax is such that it can clear it's value
> and that "This can be useful to clear the .wgetrc settings."
>
> But that is only referring to 1 switch. How do you clear other
> .wgetrc settings (or have it ignored?).
>
> My specific case is my .wgetrc file having 'convert-links=on',
> which is useful in most cases, but in a batch-file, I wanted to
> make sure that was off. How do I turn off convert-links from the
> command line (so it will override the .wgetrc value)?
You have several options (I extend my answer a bit due to the ongoing
discussion).
1. you want to read .wgetrc but want to explicitly set one or more
options for a special use case (disregarding what .wgetrc says for that
option.
Just use the option with the value you want, e.g. in your case use
either --convert-links=off or --no-convert-links.
2. create a special config file for your use case with all that special
settings, e.g. 'my.config' and specify it with --config=my.config.
3. Tell wget not to read a config file at all with --no-config.
Then you rely on wget's defaults which *might* change in future versions
(of course we wouldn't do so without a good reason).
[Sorry, that isn't documented as I just see - has to be fixed]
On production systems you want a stable behavior. So it might be good
not to rely on global config files that may be changed by you or someone
else (e.g. a system update might change /etc/wgetrc).
In this case either 2. or 3. seems a wise choice.
>
> Thanks a bunch!
> -linda
With Best Regards, Tim
signature.asc
Description: OpenPGP digital signature