Google search from Linux and UNIX command line - Comment Page: 1
Today I started thinking that how cool is do some Google searches straight from command line. First I try to find some ready tricks from the Internet, but I couldn't find quickly anything good. So I decide do a simple Bash function that can take Google search as parameter and open Firefox Browser (tab) with Google search. Sounds easy... :)
First we need Google search URL without search parameter and it looks like this:
http://www.google.com/search?hl=en#q=
Next is good to do some tests with Firefox, URL and search words from command line:
firefox http://www.google.com/search?hl=en#q=test
Works as it should work
firefox http://www.google.com/search?hl=en#q=test more words
Not...
I get a “no match found for ” in my ZSH, any idea why? I even put in alias google=`noglob google`
Hi Sindhu,
I tested a bit this function on ZSH shell and the problem seems to be that, how to ZSH shell handles special characters, such as question mark (?) and ampersand (&). This is easy to fix, simply use backslash (\) before question mark (?) and create function like following:
Did you get it to work? :)
Excellent tip .. Thanks
I wrote a Google Cli Search tool for linux, you may be interested in Gisele
Hi Boris,
Thanks! Looks very nice! :)
really thanks for this – you saved my day!
Wow! Worked like a charm.
Did have to modiry command firefox with
firefox --no-remote -P
though!Loved it! Thanks! :)
Thanks a lot for this information. Would you please show how to search startpage.com or ixquick from the command line. Again, thanks for the info.
How would this work with startpage.com?
thanks a lot………..
very m,uch creative,,
Thanks, added to my .bashrc immediately