Le 15.05.02, Stephane JEAN BAPTISTE a tapot� :

| Bonjour.

        'jour !


| Je voudrais faire un script shell pour appeler r�guli�rement une adresse
| web pour tester un analyseur de logs.
| Par exemple, "http://www.yahoo.com"; toutes les 5 minutes.
| Est-ce possible ?

        Oui.

TIMEOUT=90
URL=http://www.yahoo.com
while [ true ]; do
  GOOD=`lynx -dump -connect_timeout=$TIMEOUT -head $URL 2> /dev/null | grep 
"200 OK"`
  if [ "$GOOD" = "" ]; then
     echo "ERROR"
  else
     echo "GOOD"
  fi
  sleep 300
done



| Merci
|
|
|

Thomas
-- 
BOFH excuse #90:
Budget cuts


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Répondre à