Microsoft
Software
Hardware
Network
Question : Bash: curl and redirected url
Hi experts,
I know that
status=$(curl -s --head "$URL" | awk '/HTTP/ {print $2})
gives http code such as "200" or "404" Assume that the code is "310" ("moved permanently"), then how to use "curl" to retrieve the new url?
I googled but I got no answers.
Thanks for any replies.
Answer : Bash: curl and redirected url
NewURL=$(curl -s --head "$URL" | awk '/Location:/ {print $2}')
Random Solutions
Sybase IQ HG Index
Ghost Mac Drive
GoDaddy and .htaccess file creation
How to keep email on another host.
Users, Logins, Connections etc.
Hungapp everytime I try to download a file in IE6 or 7
Error loading type library/DLL (QuickTax)
Exchange 2003 Setup Guide: idiots guide
PHP Soap Error
rmdir