Created
January 21, 2012 00:58
-
-
Save jmarrama/1650523 to your computer and use it in GitHub Desktop.
140 script getter
This file contains hidden or 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 | |
url_prefix="http://www.stanford.edu/~ouster/cgi-bin/cs140-winter12/"; | |
wget http://www.stanford.edu/~ouster/cgi-bin/cs140-winter12/lectures.php | |
grep -o 'lecture.php?topic=[A-Za-z]*' lectures.php | uniq -u > uniqlecs | |
for lecfile in `cat uniqlecs`; | |
do | |
lec_url=$url_prefix$lecfile | |
echo "opening lecture file "$lecfile | |
#### if you're using macosx, this just should be open on the | |
#### default browser | |
#### but on linux use gnome-open instead | |
#### TODO - how to print these from the cmd line? | |
open $lec_url | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ok cool - i get the gist of it