bug-wget
[Top][All Lists]
Advanced

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

Re: Mention multiple -O OK


From: Darshit Shah
Subject: Re: Mention multiple -O OK
Date: Sun, 19 Feb 2023 06:53:01 +0530
User-agent: Cyrus-JMAP/3.9.0-alpha0-156-g081acc5ed5-fm-20230206.001-g081acc5e


On Fri, Feb 17, 2023, at 18:03, Tim Rühsen wrote:
>
> It is not possible to control the stored file names with multiple -O 
> options (missing feature)

Sorry, but no. This is not a missing feature. Its a long standing annoyance of 
mine but the manual describes -O as being equivalent to shell redirection. See 
the below selected quotes from the man page:

```
Use of -O is not intended to mean simply "use the name file instead of the one 
in the URL;" rather, it is analogous to shell redirection: wget -O file 
http://foo is intended to work like wget -O - http://foo > file; file will be 
truncated immediately, and all downloaded content will be written there.
```

And

```
Similarly, using -r or -p with -O may not work as you expect: Wget won't just 
download the first file to file and then download the rest to their normal 
names: all downloaded content will be placed in file.
```

Since this is a long standing documented "feature" I am not keen on modifying 
the default behavior as automated scripts that rely on it my break. 

This was the reason that the first thing I did with Wget2 was to remove that 
sentence and implication from its manual allowing for a more intuitive 
implementation of the -O option there. However, unfortunately, this 
non-intuitive behavuour of -O shall stay in Wget for the time being. 



reply via email to

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