Advertisement
sindrijo

dlfilesbashscript

Nov 13th, 2012
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.96 KB | None | 0 0
  1. #!/bin/bash
  2. read -p "What is the filename prefix? (Eg: \"part_\") Type it and press [ENTER]:" filePrefix
  3. read -p "Up to what XX? (Eg: \"11\") Type it and press [ENTER]:" xMax
  4. read -p  "Up to what YY?  (Eg: \"5\") Type it and press [ENTER]:" yMax
  5. read -p "What folder to save it in?" folderName
  6.  
  7.  
  8. xxMax=$xMax
  9. yyMax=$yMax
  10. for xx in $(eval echo "{00..$xxMax}")
  11. do
  12.     for yy in $(eval echo "{00..$yyMax}")
  13.         do wget http://home.nith.no/~raakje/$filePrefix$xx-$yy -q -P ./$folderName && echo part_$xx-$yy downloaded || echo part_$xx-$yy failed;
  14.     done
  15. done
  16.  
  17. #for XX in {00..$xMax};
  18.     #do for YY in {00..$yMax};
  19.     #   do wget http://home.nith.no/~raakje/$filePrefix$XX-$YY -P ./downloadfolder && echo part_$XX-$YY success || echo part_$XX-$YY failure;
  20.     #done;
  21. #done
  22.  
  23. #for XX in {00..11}; do for YY in {00..05}; do wget http://home.nith.no/~raakje/part_$XX-$YY -c -q -P ./downloadfolder && echo part_$XX-$YY downloaded || echo part_$XX-$YY failure; done; done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement