Created
June 28, 2010 20:25
-
-
Save hemanth/456310 to your computer and use it in GitHub Desktop.
Google sunrise+sunset from terminal
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
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