opexxx

downloadURLlist.sh

Jun 24th, 2015
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.40 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. # Download URLs from file (called queue) with history.
  4.  
  5. # License: LGPLv2
  6.  
  7. # I schedule this to run every night.
  8. # The file called queue must be in the same dir
  9. # as this script and lines starting with # are ignored.
  10.  
  11. cp queue queue.tmp
  12.  
  13. sed "/ *#/d" queue |
  14. while read url; do
  15.     echo "#$url" >> queue.tmp
  16.     wget -nv "$url"
  17. done
  18.  
  19. sed -n "/ *#/p" queue.tmp > queue
  20. rm -f queue.tmp
Add Comment
Please, Sign In to add comment