Skip to content

Instantly share code, notes, and snippets.

@juanpablocs
Last active January 8, 2019 16:54
Embed
What would you like to do?
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