--- /dev/null
+#! /bin/sh
+#max of max is 999!
+max=310
+umask 077
+exec &>~/priv/centrum.log
+cd ~
+rm -rf ~/centrum
+mkdir ~/centrum
+cd ~/centrum
+i=1
+last=
+while [ $i -le $max ];do
+ j="`echo -n 000$i|tail -c 3`"
+ echo -n "$j: `date` - "
+ lynx -auth short:`cat ~/priv/centrum.pwd` -reload -source 'http://hazard.centrum.cz/~short~eb3c8f5deb72db253053b59290c804d9/hry/bandita_code.phtml' >$j.html
+ date
+ now="`sed -n 's/^.*Kredity.*VALUE="\([0-9]*\)".*$/\1/p' <$j.html`"
+ if [ "$now" = "$last" ];then break;fi
+ last="$now"
+ sleep 17
+ i=$[$i+1]
+ done
+echo -n "Termination: "
+if [ $i -gt $max ];then echo "max $max credits exceeded."
+else echo "Count "$last" matched on file $j.html."
+fi
+echo "Current credits: $last"
+tar cf - *|bzip2 -v >~/priv/centrum.tar.bz2
+cd ~
+rm -rf ~/centrum