Brian's Waste of Time

Wed, 06 Oct 2004

Command Line Google

Saw a pointer to Ruby/Google in PickAxe 2 so had to play around some =)

[mccallister@kite ~]$ google --max 1 -t -H "Best Programming Language"
url: http://www.ruby-lang.org/
title: Ruby Home Page
[mccallister@kite ~]$

Command line google! Requires Ruby 1.8.1 and the aforementioned Ruby/Google library. Have fun!

Usage: google [options] query-string

  Options:
    -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
    -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

0 writebacks [/src/ruby] permanent link