#!/bin/bash function checkhttp { tmp=`curl -sI $1 | head -1 | awk '{print $2}'` [[ ! $tmp = 200 ]] && echo $1 is down: $tmp unset tmp } checkhttp http://os3.su/ checkhttp https://os3.su/ checkhttp http://nethence.com/ checkhttp https://nethence.com/ checkhttp http://pub.nethence.com/ checkhttp https://pub.nethence.com/