Skip to content

Instantly share code, notes, and snippets.

@nicolaihald
Created May 3, 2017 06:57
Show Gist options
  • Select an option

  • Save nicolaihald/66cb1f649df2291e361d648f7d7fcd09 to your computer and use it in GitHub Desktop.

Select an option

Save nicolaihald/66cb1f649df2291e361d648f7d7fcd09 to your computer and use it in GitHub Desktop.
Get HTTP status code with curl AND print response on new line
while true; do curl -s -o /dev/null -w "%{http_code}\n" http://localhost; sleep 2; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment