Last active
November 3, 2015 09:55
-
-
Save wingsuitist/6be773556963fbb415bb to your computer and use it in GitHub Desktop.
google search command function for bash
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
# google search command | |
# usage: | |
# google test | |
# google "site:9gag.com developers" | |
function google() { | |
curl -s --get --data-urlencode "q=$1" http://ajax.googleapis.com/ajax/services/search/web?v=1.0 \ | |
| sed 's/"unescapedUrl":"\([^"]*\).*/\1/;s/.*GwebSearch",//'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment