wget-client.


#!/bin/bash RemoveIP=127.0.0.1 RemovePort=80 NumberOfWgetPerInterval=3 Interval=3 FileName=vod Extension=txt PostFixStart=1 PostFixEnd=10 WgetLimitRate=1024000k function main() { postFix=$PostFixStart ( while : do if [ $postFix -gt `expr $PostFixEnd - $NumberOfWgetPerInterval` ]; then postFix=$PostFixStart fi startDownLoad $postFix postFix=`expr $postFix + $NumberOfWgetPerInterval` sleep $Interval done )& } function startDownLoad() { postfix=$1 for (( i=0; i<$NumberOfWgetPerInterval; i++)); do #echo "http://$RemoveIP:$RemovePort/$FileName$postfix.$Extension" wget -O /dev/null --limit-rate=$WgetLimitRate --continue --quiet http://$RemoveIP:$RemovePort/$FileName$postfix.$Extension postfix=`expr $postfix + 1` done } main

 

你可能感兴趣的:(client)