Created
February 2, 2009 22:23
-
-
Save papajuans/57137 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Declare array | |
declare -a ARRAY | |
#Open file for reading to array | |
exec 10<urls.txt | |
let count=0 | |
while read LINE <&10; do | |
url=$LINE | |
hiturl="http://localhost:8000${LINE}" | |
filename=${url//\//-} | |
filename=${filename/#-/} | |
filename=${filename/%-/} | |
echo $filename | |
echo $hiturl | |
curl $url -o $filename.html | |
done | |
exec 10>&- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment