Created
April 4, 2018 18:03
-
-
Save henriquemenezes/34c515fa598639b46cae1ba07617d7ed to your computer and use it in GitHub Desktop.
HTTP Ping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function http-ping { | |
SLEEP=${2:-5} | |
while true; do echo "$(date +'%Y-%m-%d %H:%M:%S') - GET $1 - $(curl -sL -w "%{http_code}" -o /dev/null $1)"; sleep $SLEEP; done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment