I have a bash script to check the HTTP status code of a list of urls, but I realize that some, while appearing to be "200", display actually a page containing "error 404". How could I check for that ?
Here's my current script :
#!/bin/bash
while read LINE; do
curl -o /dev/null --silent --head --write-out '%{http_code}\n' "$LINE"
done < url-list.txt
(I got it from a precedent question : script to get the HTTP status code of a list of urls ?)
EDIT There seems to be a bug in the script : it returns "200" but if I wget -o log
that same adress I get "404 not found"