Find the answer to your Linux question:
Results 1 to 4 of 4
Why do so many open source places provide download URLs that include a ? in the middle somewhere? wget doesn't play w/ them! Is there an option for use with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Banned
    Join Date
    Dec 2002
    Location
    Texas
    Posts
    242

    wget and URLs with ?s


    Why do so many open source places provide download URLs that
    include a ? in the middle somewhere? wget doesn't play w/ them!
    Is there an option for use with wget that I'm missing? Or should
    I use something else other than wget for downloading files?

  2. #2
    Just Joined!
    Join Date
    Sep 2007
    Location
    Lafayette, IN
    Posts
    83
    Scott,

    Have you tried putting quotes around the URL? That should make it happy. It's not so much a wget issue as a shell issue. Quoting the URL should cause the shell to pass it as a single string to wget.


    BC

  3. #3
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Right. The shell has a feature called shell patterns, that allow you to select multiple files with one string. You probably know about the other special character, '*'. '*' means "0 or more characters", while '?' means "1 character". So for instance, the following all match:
    Code:
    hell* => hell, hello, hellothere
    b?b => bab, bob, bub, bbb, bcb
    If you want to pass the literal strings, surround it with single quotes ('b?b').

  4. $spacer_open
    $spacer_close
  5. #4
    Banned
    Join Date
    Dec 2002
    Location
    Texas
    Posts
    242
    I will give the quotes a whirl next time. Thanks for the heads-up.

Posting Permissions

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