Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm looking for a shell script to check a list of URLs and give output. For example:

I may place them in a separate file or inside the script. I need a valid HTTP response code for all these URLs. If all the URLs work, the response code must be HTTP OK HTTP/1.1 200 OK.

If any URL from the above URLs fails, I need output with an error message for that particular URL.

share|improve this question

You will have to install wget is you don't have it already:

for I in $LIST
  wget -q --no-cache --spider $I
  if [ $? != 0 ]; then
    echo Error: $I
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.