Created
September 15, 2016 07:19
-
-
Save rubencodes/b021a01c605092a0701fddc6c88dae1f to your computer and use it in GitHub Desktop.
Google Search CLI
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
#Begin GoogleSearch CLI for Mac | |
function google() { | |
if [ $1 = "--images" ]; then | |
open https://google.com/search?tbm=isch\&q="$2" | |
elif [ $1 = "--news" ]; then | |
open https://google.com/search?tbm=nws\&q="$2" | |
else | |
open https://google.com/search?q="$1" | |
fi | |
} | |
#End GoogleSearchCLI for *nix | |
#Begin GoogleSearch CLI for Linux | |
function google() { | |
if [ $1 = "--images" ]; then | |
xdg-open https://google.com/search?tbm=isch\&q="$2" | |
elif [ $1 = "--news" ]; then | |
xdg-open https://google.com/search?tbm=nws\&q="$2" | |
else | |
xdg-open https://google.com/search?q="$1" | |
fi | |
} | |
#End GoogleSearchCLI for *nix |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment