Skip to content

Instantly share code, notes, and snippets.

@juanpablocs
Last active January 8, 2019 16:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juanpablocs/36425b71039369a751cacf7727e88f26 to your computer and use it in GitHub Desktop.
Save juanpablocs/36425b71039369a751cacf7727e88f26 to your computer and use it in GitHub Desktop.
Curl commands utils for devops

1 to 10 requests and get only http code

curl -s -o /dev/null -I -w "Http Code: %{http_code}\n" "http://mysite.com?[1-10]"

10 request simultaneous and get only http code

seq 1 10 | xargs -I % -n 1 -P 10 curl -s -o /dev/null -I -w "http: %{http_code}\n" "http://mysite.com"

print secuence numbers in console

seq 1 10 | xargs -I % sh -c "echo '%'"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment