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
Replication jobs showing a status of "No replicated Transactions are available" - why?
How to install PowerShell v2 (CTP 3) onto Windows Vista
ArrayList or Vector or something dynamic
Moving the IE7 visited links
Best way to protect the back end of a database?
Can't access internet on workstation joined to SBS 2003 domain
Count(Decode)
Cannot set default printer
Flash scroll effect/site layout question
Word document which has some checkboxes and dropdown menu needs some tweeking in it.