grab.sh
:
#!/bin/bash
while read i; do wget -c --tries=0 $i; done
The next script called
downloadlist.sh
calls the first and sends an email when done:
#!/bin/bash
cat $1 | grab.sh
echo "Your downloads are done" | mail -s "Download notifier" myname@myemail.com
Just invoke it by passing it a file that contains a list of URLs to download, like so:
$ ./downloadlist.sh 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:
Post a Comment