Microsoft
Software
Hardware
Network
Question : Curl: how to get httpcode in Bash
Hi experts,
I know that I can use
curl -o $WEBSITEID "$URL"
to retrieve data from a url, however how to check if the retrieval is successful or not? In other words, how to get the response code (such as "200", or "404")?
Thanks for your replies.
Answer : Curl: how to get httpcode in Bash
1:
status=$(curl -s --head "$URL" | awk '/HTTP/ {print $2})
Open in New Window
Select All
Random Solutions
How can tables be detected in Access using VBA?
BCP with Format.xml file - Trying to understand <COLUMN> elements.
Problem sending email internally between 2 exchange server on different sites.
Battlefield 2: IRQL_NOT_LESS_THAN_OR_EQUA<wbr />L
Most user friendly Linux
Word 2003 gives error faulting module hpzui4wm.dll
Vpn tunnel with VPN client works fine, but no internet access anymore
Google & Yahoo stopped crawling my homepage
Multiple MSDE Databases on one server
500 points: In SSIS, how to pass parameters into Data Flow Task