All pastes #984502 Raw Edit

Unbenannt

public text v1 · immutable
·published 2008-04-14 09:40 UTC
rendered paste body
#!/bin/sh
# Pollt www12.cs.fau.de/edu/ti1 und macht ein diff drauf

URL='www12.cs.fau.de/edu/ti1/'
OLD='/tmp/ti1old'
NEW='/tmp/ti1new'
DONE='/tmp/ti1done'

if [ ! -e $OLD ]; then
?·······w3m -dump $URL > $OLD
?·······exit 0
fi

# Wenn sich die Seite geaendet hat, brauchen wir nicht nochmal pollen
# bzw. alles zuspammen
if [ -e $DONE ]; then
?·······exit 0
fi

w3m -dump $URL > $NEW
diff $NEW $OLD
if [ $? = 1 ]; then
?·······echo "$URL hat sich geaendert!"
?·······touch $DONE
?·······exit 0
fi;