Skip to content

Instantly share code, notes, and snippets.

@jmarrama
Created January 21, 2012 00:58
Show Gist options
  • Save jmarrama/1650523 to your computer and use it in GitHub Desktop.
Save jmarrama/1650523 to your computer and use it in GitHub Desktop.
140 script getter
#!/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
@jdubie
Copy link

jdubie commented Jan 23, 2012

ok cool - i get the gist of it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment