I'm trying to make a script that will check a webpage based on it's size
and tell me it's been updated by executing an xterm with a message like
"Page Updated". If it could check based on a Last updated stamp that
might even be better to save some download time with wget.
And if possible, could that xterm that was poped up be closed
automatically after 2 or so seconds and have the script carry on
checking for updates?
This script checks then mails the person a message. How could I get it
to pop up an xterm instead?
script
-------------------------------------
#!/bin/sh
# Web page checking script to see when updated
# check page 1
wget -q http://page.org/index.html >ref.$$
while sleep 1800; do
wget -q http://page.org/index.html >tmp.$$
cmp ref.$$ tmp.$$ >/dev/null ||
diff -u ref.$$ tmp.$$ | mailx -s "Page updated"
mv tmp.$$ ref.$$
done
---------------------------------------
Thanks,
Warren Bell
Remove ERASE to reply