curl see response code code example
Example 1: curl return code only
curl -s -o /dev/null -w "%{http_code}" http://www.example.org/
Example 2: curl get return code
curl -I http://www.example.org
curl -s -o /dev/null -w "%{http_code}" http://www.example.org/
curl -I http://www.example.org