#!/bin/sh

# File name to get
FILE=musor64k
# Full URL of the file
URL=http://ftp.sleepgate.ru/temp/${FILE}
# Delay between wget's
SLEEP=10

# Counters
success=0
fail=0

rm ${FILE} > /dev/null 2>&1

while true; do
	wget ${URL} > /dev/null 2>&1
	sleep ${SLEEP}
	if [ -f ${FILE} ]; then
		rm ${FILE}
		success=$((success+1))
	else
		fail=$((fail+1))
	fi
	echo "Success: ${success} times;"
	echo "Failed: ${fail} times."
done
	