Curl only response code
curl -s --head localhost | head -1 curl -sL -w "%{http_code}" localhost:80 -o /dev/null