[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [bug #49971] Tildes inside quotations in option arguments are
[Bug-wget] [bug #49971] Tildes inside quotations in option arguments aren't parsed correctly
Sun, 1 Jan 2017 22:11:27 +0000 (UTC)
Mozilla/5.0 (X11; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0
Follow-up Comment #3, bug #49971 (project wget):
In regard to tilde, you can use some tricky constructions to exploit the fact
that you don't have to quote all of the characters in an argument of a command
line. (In fact, the shell records whether each character was quoted, and the
special treatment of tildes in Bash is triggered when "a word begins with an
unquoted tilde character".)
wget -O ~/"image 17.jpg"
writes output into a file in your home directory whose name contains a space.
In regard to combining -O and -P, the manual page says:
The documents will not be written to the appropriate files, but
will be concatenated together and written to file. If - is used
file, documents will be printed to standard output, disabling link
conversion. (Use ./- to print to a file literally named -.)
Use of -O is not intended to mean simply "use the name file
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
downloaded content will be written there.
Since -P sets the root of the retrieval tree, and -O dispenses with a
"retrieval tree" entirely, you would expect -O to override -P. However, this
should probably be documented more clearly.
Reply to this item at:
Message sent via/by Savannah