Curl is fairly handy command line utility to fetch a web page. It can also be used to automate various tasks in bash shell scripts. By default curl does not follow redirect. Here is how you can use curl to follow redirect.
$ curl -L URL
Curl – follow redirect in silent mode
Curl is used often in silent mode to get code from a web page and then execute it. Here is how you can use
-L flag with curl in silent mode to install IE virtual images on VirtualBox.
$ curl -L -s https://raw.github.com/xdissent/ievms/master/ievms.sh | bash