Brian's Waste of Time

Mon, 27 Jun 2005

Command Line Google, 2.0

Just updated my google command line script to remove the dependency on the GPL'd Ruby/Google, as well as any other external libraries. All it needs now is a recent version (I am using 1.8.2) of ruby =)

brianm@kite:~$ google -h
Usage: google [options] query string which will be concatenated

    -i, --start NUMBER               Start index for results
    -m, --max NUMBER                 Max number of results to show
    -f, --[no-]filter                Activates or deactivates automatic results filtering
    -r, --restrict VALUE             Restricts the search
    -a, --[no-]safe                  Enable or disable (default disabled) filtering of adult content
    -1, --lucky                      I'm feeling lucky
    -H, --header                     Print field header on ouput (default disabled)
    -s, --snippet                    Display result snippet in output
    -t, --title                      Display result title in output
    -u, --[no-]url                   Show or hide result url in output

    -h, --help                       Show this message

Requires Ruby 1.8.1 and Ruby/Google ( )
You can obtain a (free!) google key from

Have fun!

6 writebacks [/src/ruby] permanent link