Can anyone explain me the below curl command and how it works :
STATUS_CODE=`curl –output /dev/null –silent –head –write-out ‘%{http_code}\n’ $next`
# If you want to set a timeout then add –max-time 15, here 15 is 15seconds
|
You seem to be missing a few double dashes, probably the result of copy and paste:
Assuming that you call this with
So in the end the status of the URL request ends up in (And if you want to set the timeout, then use double dashes too: |
|||||
|