Skip to content

Instantly share code, notes, and snippets.

@hemanth
Created June 28, 2010 20:25
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hemanth/456310 to your computer and use it in GitHub Desktop.
Save hemanth/456310 to your computer and use it in GitHub Desktop.
Google sunrise+sunset from terminal
function sunrise() { curl -sA Mozilla http://www.google.com/search?q=sunrise+$1 \
| html2text -width 80 \
| sed -n '10s/^ \{45\}//p';}
function sunset() { curl -sA Mozilla http://www.google.com/search?q=sunset+$1 \
| html2text -width 80 \
| sed -n '/from now/s/^ \{44\}//p'; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment