Results 1 to 6 of 6

Thread: wget problem

  1. #1
    phillip59 NNTP User

    Unhappy 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

  2. #2
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: wget problem

    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:

    Code:
    mv 'index.html?' index.html
    should rename it.

  3. #3
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,825
    Blog Entries
    15

    Default Re: wget problem

    Quote Originally Posted by phillip59
    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
    Hi
    Permissions on the file? else try using a '\' eg
    Code:
    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


  4. #4
    phillip59 NNTP User

    Default Re: wget problem

    Here's the command I used in a script:

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

  5. #5
    Join Date
    Jan 2009
    Location
    Switzerland
    Posts
    1,529

    Default Re: wget problem

    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:

    Code:
    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:

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

  6. #6
    Join Date
    Mar 2008
    Location
    Phuket, Thailand
    Posts
    26,564
    Blog Entries
    38

    Default Re: wget problem

    Further to voodoo's advice, here is an example use of wget with " -O " parameter:
    Code:
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •