CODE=`wget --spider -S "http://お前のサイト" 2>&1 | grep "HTTP/" | awk '{print $2}'`
if [ $CODE -eq 200 ]; then
処理
fi

こんな感じじゃねえの? しらんけど