wget: unable to resolve host address ...



~
I am trying to download a few binary files using wget, but wget does not apparently digest well the declaration of the user agent
~
I have tried a number of things but I keep getting the same error message. I think it relates to argument variables. How can I fix that?
~
Also how could you know exactly how your environment has interpreted argument variables? To me the output of "echo" looks fine
~
#!/bin/bash

# user-agent
_UA="Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Iceweasel/6.0.2"

wget \
--no-verbose \
--continue \
--no-clobber \
--server-response \
--user-agent=${_UA} \
http://www.gutenberg.org/dirs/etext95/cavep11h.zip

~
and this is what I get:
~
$ sh wget04_test.sh
// __ _UA: Mozilla/5.0 (X11; Linux i686; rv:6.0.2) Gecko/20100101 Firefox/6.0.2 Iceweasel/6.0.2
wget: unable to resolve host address `(x11;'
wget: unable to resolve host address `linux'
wget: unable to resolve host address `i686;'
wget: unable to resolve host address `rv'
wget: unable to resolve host address `gecko'
wget: unable to resolve host address `firefox'
wget: unable to resolve host address `iceweasel'
HTTP/1.1 200 OK
Date: Sat, 07 Jul 2012 15:31:23 GMT
Server: Apache
Content-Length: 1429339
Content-Disposition: attachment; filename=cavep11h.zip
X-Rate-Limiter: php
Cache-Control: max-age=86400
Expires: Sun, 08 Jul 2012 15:31:23 GMT
X-Frame-Options: sameorigin
Keep-Alive: timeout=5, max=193
Connection: Keep-Alive
Content-Type: application/zip
2012-07-07 11:30:40 URL:http://www.gutenberg.org/dirs/etext95/cavep11h.zip [1429339/1429339] -> "cavep11h.zip" [1]
FINISHED --2012-07-07 11:30:40--
Downloaded: 1 files, 1.4M in 0s (2662351 GB/s)
~
thanks
lbrtchx
comp.unix.shell:wget: unable to resolve host address ...
.



Relevant Pages

  • Re: Wget, curl, Yum :it was [Strange things in Yum]
    ... On Thu, 2006-02-16 at 12:08 +0100, Antonio Montagnani wrote: ... >>> The output from your wget seems to be less verbose than mine. ... > This is the output of curl command: ... Couldn't resolve host 'download.fedora.redhat.com' ...
    (Fedora)
  • Re: wheezy: Font rendering problems in GNOME 3.2.1?
    ... but can't load the above URI: ... wget: unable to resolve host address `www2.inf.fh-brs.de' ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)
  • Re: Linux systems website is working - windos system website is not working
    ... get hold of a utility called wget. ... find out the user agent strings for some typical user agents (i.e. web ... browsers) running on windows and linux. ... files with each different user agent string. ...
    (alt.html)
  • Re: curl alternative
    ... For wget, you might want to explicitly set the User Agent value to ... match the browser you are using. ...
    (comp.unix.shell)
  • Re: wget vs lynx
    ... while lynx (and other text and graphical web browsers) succeeded to ... Your server does not like wget user agent, in fact it works if you tell wget to ... To UNSUBSCRIBE, email to debian-user-REQUEST@xxxxxxxxxxxxxxxx ...
    (Debian-User)