Friday, December 28, 2007

Batch Download Scripts

Here's a pair of scripts I keep for batch downloading. The first is to download a list of stuff that is passed to it, called


while read i; do wget -c --tries=0 $i; done

The next script called calls the first and sends an email when done:


cat $1 |
echo "Your downloads are done" | mail -s "Download notifier"

Just invoke it by passing it a file that contains a list of URLs to download, like so:

$ ./ listofurls

It's brain-dead simple, but since I'm lousy at remembering stuff I am writing it here for my own reference.

No comments: