Curl/wget shell script to follow redirect.

Hello eveyone.
I would like to create a simple batch with curl (or wget) to download a URL but the URL I can only download from the browser and not from shell because curl and wget won't follow the 301 redirect which I get :confused:
I tried with curl -L but no luck.
I want to hear your opinion. The url is posted just below.

http://blocklist.sigmaprojects.org/api.cfc?method=getlist&lists=spyware

Thanks for your attention.

Trying lynx and wget - both downloaded the gzipped text file.

My wget version won't work. Unluckly I can't update it. Can you please tell me which parameters you use with wget?

$ wget http://blocklist.sigmaprojects.org/api.cfc?method=getlist&lists=spyware

wget: not an http or ftp url: https://blocklist.sigmaprojects.org/api.cfc?method=getlist

I issued

 wget "http://blocklist.sigmaprojects.org/api.cfc?method=getlist&lists=spyware"

Version:

GNU Wget 1.15 built on linux-gnu.

And curl worked for me with the addition of the '-L' flag. What message (or error?) do you see when you try it?

Here's the version of curl in case you want to compare.

curl 7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3

wget 1.12

and

curl 7.24.0 (mipsel-unknown-linux-gnu) libcurl/7.24.0 OpenSSL/0.9.7m zlib/1.2.5
Protocols: file ftp ftps http https imap imaps pop3 pop3s rtsp smtp smtps tftp
Features: IPv6 Largefile NTLM NTLM_WB SSL libz

With curl -L i got this

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.5.8</center>
</body>
</html>

:frowning: