google - command-line Google interface
google [options] keyword(s) google [options] keyword(s) site:<URL> google [options] link:<URL> google [options] related:<URL> google [options] info:<URL> google --help
Following options can be specified either in the command line, or in google startup file found at ~/.googlerc
displays the list of available options and exists
number of results returned in the result set
where should the result set start
filter out offensive and adult content
display brief snippet of the resource
input encoding. Default is utf-8
output encoding. Default is utf-8
display full manual of the client
google is a command-line interface to Google Search. It uses Aaron Straup Cope's Net::Google library, which in turn, is an interface to Google's SOAP API.
To be able to use this tool, you first need to create an account with Google. It is free. Visit http://www.google.com/apis/ for details. After creating your account successfully, you will be provided with a key to use this tool.
perl Makefile.PL make make install
The above set of commands will install the library to your sitebin folder. It is usually /usr/bin/ in some *nix machines. If you do not have write access to this folder, you can alternatively install in your own ~/bin directory:
perl Makefile.PL INSTALLSCRIPT=~/bin make make install
Every time you use google to search the Web, you should provide your key with "--key" option. I know, it gets pretty tedious in no time. That's why we added support for default options file.
google searches for a file called .google or .googlerc in your home directory. If it can't find any, it looks for those files in your current directory as well as in the directory google was installed in.
You can find a more verbose option file in the google distribution folder. Options provided in the command line will override the ones set in the options file.
returns first 10 (unless you overrode it in your options file) results for keyword "mod_perl".
google --max-results=5 --snippet mod_perl
similar to the first example, but returns first 5 results with snippets.
google mod_perl site:apache.org
returns first 10 results for mod_perl from apache.org
returns brief information about the resource
returns related resources for perl.com
returns first 10 resources that have links to cpan.org.
Support for Google's spell checker, as well as Google cache
Copyright (C) 2003 Sherzod B. Ruzmetov. google is free software. You can modify and/or redistribute it under GNU/Artistic license.
Sherzod B. Ruzmetov <email@example.com>
For bugs, feed backs and suggestions: <firstname.lastname@example.org>