title: Check if a URL goes to a page containing the text "404"
body: <p>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 ?</p>
  
  <p>Here's my current script :</p>
  
  <pre><code>#!/bin/bash
  while read LINE; do
    curl -o /dev/null --silent --head --write-out '%{http_code}\n' "$LINE"
  done &lt; url-list.txt
  </code></pre>
  
  <p>(I got it from a precedent question : <a href="https://stackoverflow.com/questions/6136022/script-to-get-the-http-status-code-of-a-list-of-urls">script to get the HTTP status code of a list of urls ?</a>)</p>
  
  <p><strong>EDIT</strong> There seems to be a bug in the script : it returns "200" but if I <code>wget -o log</code> that same adress I get "404 not found"</p>