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
Google Words
Reporting Services - Export to PDF Causes Error
Convert Timestamp To Date
Error 1923. Service 'SQL Server ()' () could not be installed.
How can I swap image on a link on click and have it revert back when a new link is clicked?
OCS 2007 R2 Group Chat Server
Adobe Acrobat 8 Form Designer
Requested action not taken: mailbox unavailable. [SMTP Error Code 550]
Which version of WDS am I running?
Difference between Set chained OFF|ON, Sybase