Created
March 14, 2012 04:18
-
-
Save PhirePhly/2034024 to your computer and use it in GitHub Desktop.
Downloads all of Bell System's Technical Journals
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/sh | |
# | |
# Kenneth Finnegan, 2012 | |
# kennethfinnegan.blogspot.com | |
# | |
# Slowly download all Bell Systems technical articles | |
# Best to spin this off in the background or on a screen | |
alias slowget='wget --limit-rate=25k ' | |
DOMAIN="http://www.alcatel-lucent.com" | |
slowget $DOMAIN/bstj/ -O top.$$ | |
VOLUMES=`grep -oe "/bstj/vol[0-9,\-]*/bstj-vol[0-9]*-issue[0-9]*.html" <top.$$` | |
rm top.$$ | |
for EACH in $VOLUMES; do | |
slowget http://www.alcatel-lucent.com$EACH | |
PREFIX=`echo $EACH | grep -o -e "/bstj/vol[0-9,-]*/"` | |
FILE=`echo $EACH | grep -o -e "bstj\-vol.*"` | |
ARTICLES=`grep -oe "articles/.*\.pdf" <$FILE` | |
rm $FILE | |
for EACHART in $ARTICLES; do | |
echo $DOMAIN$PREFIX$EACHART | |
slowget $DOMAIN$PREFIX$EACHART | |
done | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment