#!/bin/bash
# (c) 2001 Nepto <nepto@pobox.sk>
# $Platon: url-check.sh,v 1.4 2002/02/12 00:34:24 jombik9 Exp $
SLEEP=2;
REQUESTED_URL="http://www.dcs.fmph.uniba.sk/foja/foja_11.html"
#REQUESTED_URL="http://kepler.fmph.uniba.sk/~jombik9/start.html"
action_cmd(){
data=`./foja_parser.pl $REQUESTED_FILE`;
if [ -z $data ]; then
rm -f $REQUESTED_FILE;
else
echo $data | tr " " "\n" | ./foja_mkmail.pl \
| /usr/sbin/sendmail foja2@st.fmph.uniba.sk
exit 0;
fi
}
#############################################################################
REQUESTED_FILE=`echo $REQUESTED_URL | tr "/" "\n" | tail -n 1`
if [ -e $REQUESTED_FILE ]; then
echo "File '$REQUESTED_FILE' already downloaded. Remove it first.";
exit 1;
fi
while [ 1 -eq 1 ]; do
wget -q --proxy=off --tries=1 $REQUESTED_URL
if [ -e $REQUESTED_FILE ]; then
action_cmd;
fi
sleep $SLEEP;
done
Platon Group <platon@platon.sk> http://platon.sk/
|