I've written a shell script that has a function like this:
function getpage {
echo $1
curl -O "http://www.example.com/$1" -b cookie.txt -s
}
The problem is if the website times out then that page will be skipped, I need it to re-try if it times out (I will also be putting in a 60 second timeout).
How do I do this?