wget problem

When using wget with the -O option the file is down-loaded successfully but a “?” is appended to the file name.

Example: index.html?

I’m not able to rename or make a copy of the file to remove the “?”.

HELP

Hello phillip59

My personal copy of wget (kindly donated to me by openSuSE) writes to the exact filename given with the -O option. Can you show the command you used to get your result?

BTW:

mv 'index.html?' index.html

should rename it.

Hi
Permissions on the file? else try using a ‘’ eg


mv index.html\? file.html


Cheers Malcolm °¿° (Linux Counter #276890)
SUSE Linux Enterprise Desktop 11 (x86_64) Kernel 2.6.27.29-0.1-default
up 2 days 18:14, 2 users, load average: 0.18, 0.35, 0.17
GPU GeForce 8600 GTS Silent - CUDA Driver Version: 190.18

Here’s the command I used in a script:

wget -O “http://www.xxx.com” “/home/aaa/bbb/index.html”

Ooops, you are telling wget to write to a file named “http://www.xxx.com”. A filename with slashes in it. Please check the man page for the right syntax. Probably you want it the other way round:

wget -O /home/aaa/bbb/index.html "http://www.xxx.com"

And remember: when you retrieve several files all will be written into one output file. It is equivalent to:

wget -O - "http://www.xxx.com" > /home/aaa/bbb/index.html

Further to voodoo’s advice, here is an example use of wget with " -O " parameter:

wget -O alsa-info.sh http://www.alsa-project.org/alsa-info.sh && bash alsa-info.sh

In this case, it downloads to a file name “alsa-info.sh” the file from http://www.alsa-project.org/alsa-info.sh. It then runs that file as a script file.

Note in the above example there are no quotations in the command.