Checking Whether a URL Exists from the Command Line
Run the following command from a terminal on your local Mac:
1 | curl -v <URL> 2>&1 1>/dev/null | awk '{if($2~"HTTP") print}' |
OK Pattern.
1 | < HTTP/1.1 200 OK |
NG Pattern
1 | < HTTP/1.1 404 Not Found |
Checking Whether a URL Exists from the Command Line
https://kenzo0107.github.io/en/2015/06/16/check-whether-the-url-exists/