5 exec &>~/priv/centrum.log
12 while [ $i -le $max ];do
13 j="`echo -n 000$i|tail -c 3`"
14 echo -n "$j: `date` - "
15 lynx -auth short:`cat ~/priv/centrum.pwd` -reload -source 'http://hazard.centrum.cz/~short~eb3c8f5deb72db253053b59290c804d9/hry/bandita_code.phtml' >$j.html
17 now="`sed -n 's/^.*Kredity.*VALUE="\([0-9]*\)".*$/\1/p' <$j.html`"
18 if [ "$now" = "$last" ];then break;fi
23 echo -n "Termination: "
24 if [ $i -gt $max ];then echo "max $max credits exceeded."
25 else echo "Count "$last" matched on file $j.html."
27 echo "Current credits: $last"
28 tar cf - *|bzip2 -v >~/priv/centrum.tar.bz2