Created
May 31, 2023 15:18
-
-
Save orzklv/b726987618609c7fee46230ba670005f to your computer and use it in GitHub Desktop.
Googling from shell script
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() { | |
if [ -z "$1" ]; then | |
echo "No argument supplied" | |
return | |
fi | |
echo "Searching for $@" | |
search_string="$@" | |
# Linux users should change "open" to "xdg-open" | |
# or create alias open="xdg-open" | |
open "https://www.google.com/search?q=$search_string" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment