Unattended Downloads using WGET
If you have a lot of direct download links you can do a batch download of those files with wget using this simple bash script, unattendedget.sh:#!/bin/bash export OFS="$IFS" ; export IFS=$'\n'; for i in $( cat $1 ); do wget -c $i done export IFS="$OFS" exit 0To run the script first you need to make it executable:
$ chmod u+rx unattendedget.sh
and then execute it:
$ ./unattendedget.sh textfile
where textfile it’s just a plain text file that has all the download links. Say you have a file called links.txt, this file should look like this:
www.foo.com/image.jpg www.bar.com/document.odt www.foobar.com/video.avi www.foo.com/bar/otherfile.tar www.bar.com/foo/onemorevideo.avi
to download the 5 files in links.txt just run the script and give the name of the file with the links:
$ ./unattendedget.sh links.txt
unattendedget.sh is available in the Downloads page.
0 comments
