Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # This script downloads files from the list with name file*.list
- # Each row in any of the file*.list must be full URL like
- # http://example.com/example.file
- # Also if not all of files were downloaded it can re-check and download
- # the files that were missed ("mirroring" function).
- # To make this script work dont forget to create list of URLs with name file.list
- # Or you may change the "listname" variable to suit your needs.
- listname=file*.list
- cat $listname | while read line; do
- let rownum=$(grep -o "/" <<<"$line" | wc -l)+1
- namev=$(echo $line | awk -F"/" '{ print '"$"$rownum' }')
- if [ ! -f $namev ]; then wget $line; fi
- done
Add Comment
Please, Sign In to add comment