Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    escaping "?" char in wget -A option


    Hi Guys

    Is there any way I can escape the "?" char when invoking the -A option:

    Code:
    wget -A "page.php?getid=1" mysite.com

  2. #2
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    Yup. Single quotes (') do not allow any interpolation of the internal string. Double quotes do variables as well as shell globbing.

    So this should work:
    Code:
    wget -A 'page.php?getid=1' mysite.com

  3. #3
    Thanks. What if I wanted to use the * wildcard between single quotes ? Would it be translated as a literal or wildcard ? e.g:

    Code:
    wget -A 'page.php?getid=*' mysite.com

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,252
    If you use single quotes for a string, the string is treated literally: no expansion is performed on anything.

Posting Permissions

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