commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
google query_with_spaces "
so, make sure to end your query with a double quote
There are 16 alternatives - vote for the best!
Searches Google, but requires no "", and will also search all terms input in the CL, eg:
> google foo bar
returns search URL "
You could also use awk to replace all spaces with a +, which is how the Google search handles spaces, but that makes it more than one line.
if [ -n "$1" ]
Ive aliased this script as 'google' on my system and I can type 'google "search terms"' to open firefox with my search terms. My first post here, if there are any improvements to be made please let me know in the comments.
If you can do better, submit your command here.
You must be signed in to comment.