[HLUG] checking if google recognises a string with bash

Richard Smedley smedley358 at btinternet.com
Mon Jul 28 08:52:27 BST 2008


On Sat, 2008-07-26 at 20:03 +0100, j michaelson wrote:
>  cutting and pasting the word into google's search is a
> bit tedious. does anyone have any idea how i could automate this with
> bash scripting? preferably an "if" check that is positive if google's
> result looks something like this....
> 
> "Your search - blahblahblah - did not match any documents."


For commandline searching of Google and other sites
you need to install Surfraw [1] - but to use the results
automatically you'll need a bit of further bash jiggery-pokery.

> (i seem to get bored of my online identities really quickly and kill
> them off on a regular basis, am i the only one who does this?)

Apart from /. and Ebay identities from the early days of
those sites I always use my Real Name [TM].

 - Richard

[1] http://surfraw.alioth.debian.org/








More information about the Herefordshire mailing list