Skip to content

Instantly share code, notes, and snippets.

@miguelrios
Created February 1, 2012 20:29
Show Gist options
  • Save miguelrios/1719128 to your computer and use it in GitHub Desktop.
Save miguelrios/1719128 to your computer and use it in GitHub Desktop.
Bash script that checks if Facebook posted their IPO papers to the SEC every 10 seconds (warning, very naive approach, make it better).
#!/bin/sh
URL='http://www.sec.gov/cgi-bin/browse-edgar?company=facebook&match=&CIK=&filenum=&State=&Country=&SIC=&owner=exclude&Find=Find+Companies&action=getcompany'
alias fb_sec='curl $URL'
PREIPO=`fb_sec`
while : ;
do
sleep 10s
IPO=`fb_sec`
if [[ "$IPO" != "$PREIPO" ]]
then
open $URL
else
echo 'Nothing to see here!'
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment