ToxicCode     =Home= / =Config Files= / =Shell Scripts= / =Articles= / =Text Files= / =Misc= /

Register | Login | Submit new shell script

Title: webwatcher
Submitted by: Fingel on 2009-03-16
Function: Watches a website and tells if something has changed

#!/bin/bash
#Orignally by ijanos from http://bbs.archlinux.org/viewtopic.php?id=56646&p=6
#Depends on Cowsay and figlet.
###

URL='http://someurlcomes.here'
MSG='Moooo'

wget $URL -O /tmp/original

while true;do
    wget $URL -O /tmp/new
    diff -i -b -B -q /tmp/original /tmp/new
    if [ ! $? -eq 0 ]; then
        figlet $MSG|cowsay -n|xmessage -file - -center
        exit
    fi
    sleep 300
done



Comments



Nothing Copyrighted