Getting curl to output HTTP status code?

Advertisement

A more specific way to print out just the HTTP status code is something along the lines of:

Command:
curl -s -o /dev/null -w "%{http_code}" https://wordpress.org/

Output:
200

E.g.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: