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
Call Manager Administration Page/Directory Service Fails, all other IIS HTML pages work?
How to set up handhelds to work with direct push exchange 2007 activesync
SQL QUERY most recent date for a person_id returning all rows
SQL return a boolean on evaluation of an existing field.
Treeview Events and References
Address list & GAL,
keybindings for the Windows key?
How to make changes and implement group policy
unix bash scripting - if statements
having trouble with setInterval();