Hi,
I'm trying to write a script to download RedHat's errata digest.
It comes in a txt.gz format, and i can get it easily with firefox.
HOWEVER: output is VERY strange when donwloading it in a script. It seems I'm getting a file of the same size - but partially text and partly binary! It contains the first message in the digest, and then garbled data of what i can only assume is the rest of the .gz file.
Here is the basic request (I removed the http prefix because i'm not allowed to post links in the forum):
[mod]When posting a command line, use [url=http://www.unix.com/misc.php?do=bbcode\#code]
tags, which allow you to post URLs as they aren't parsed
wget http://www.redhat.com/archives/enterprise-watch-list/2011-July.txt.gz
I think this is an attempt by redhat to block people who try to retrieve the errata by script.... so I tried messing with the user agent ID string. no luck. output is the same. Here is an example of what I tried:
wget -U "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3" http://www.redhat.com/archives/enterprise-watch-list/2011-July.txt.gz
curl also gives incorrect output - only the text of the first message. it probably tosses out the garbled binary data.
curl --silent http://www.redhat.com/archives/enterprise-watch-list/2011-July.txt.gz
curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" http://www.redhat.com/archives/enterprise-watch-list/2011-July.txt.gz
This is really annoying. Again, firefox gets it ok as a gz file. what should I do?
Thanks in advance....