view bin/google @ 4004:c08a49fca968

<mrhmouse> wget http://nodejs.org/dist/v0.10.22/node-v0.10.22-linux-x64.tar.gz -O node.tar.gz
author HackBot
date Wed, 13 Nov 2013 16:29:23 +0000
parents e037173e0012
children
line wrap: on
line source

#!/bin/bash
if [ ! "$1" ]
then
    echo 'Google what?'
    exit 1
fi

QUERY=`echo -n "$1" | od -t x1 -A n -w1000 | tr " " %`

lynx --cfg=/dev/null --lss=/dev/null \
     --dump --width=1000 'http://google.com/search?q='"$QUERY" |
    grep -A 4 'Search Results' |
    tail -n 2