Pages

7/26/2010

Shell Script for infinitely downloading webpage content

#!/bin/bash
#set delay and url
delay=5
url="www.example.com"

#run infinite loop, stop by using ctrl-c
while [ 1 ]
do
echo "start downloading $url"
wget --no-cache --no-http-keep-alive -p -O tempdl.tmp --delete-after $url 2>&1 >&/dev/null
echo "done"
sleep $delay
done

No comments:

Post a Comment