Posted By

zxeem on 05/15/09


Tagged

Bash download wget rfc


Versions (?)

RFC Downloader


 / Published in: Bash
 

URL: http://zxeem.wordpress.com

  1. #!/bin/bash
  2. ####################################################
  3. # Created By Dino
  4. # An RFC [ Request for comment ] Files doewnloader.
  5. # to run ..
  6. # chmod +x rfcDownloader.sh
  7. # ./rfcDownloader.sh
  8. ####################################################
  9. i=0;
  10. SLEEP_TIME=5;
  11. RFC_MAX=6000;
  12. while [ $i -le $RFC_MAX ]; do
  13. i=`expr $i + 1` ;
  14. if [ $i -le 9 ]; then
  15. wget -b -c "http://www.ietf.org/rfc/rfc000$i.txt" &
  16. elif [ $i -le 99 ]; then
  17. wget -b -c "http://www.ietf.org/rfc/rfc00$i.txt" &
  18. elif [ $i -le 999 ]; then
  19. wget -b -c "http://www.ietf.org/rfc/rfc0$i.txt" &
  20. elif [ $i -le 9999 ]; then
  21. wget -b -c "http://www.ietf.org/rfc/rfc$i.txt" &
  22. fi
  23. sleep $SLEEP_TIME;
  24. done

Report this snippet  

You need to login to post a comment.