#!/bin/ksh # Id: stfw,v 1.3 2004/01/03 16:26:49 chipster Exp # # stfw # a small shell program to search Google right from your shell. # REQUIRED: Lynx # # Copyright (C) 2003 Chip Cuccio # NOTE: Don't forget to edit/check user settings below!!! # ------------------------------------------------------------------- # This is GPL'd Free Software; PROG_NAME=`basename $0` ACCEPT_COOKIES=1 # change to suit case "$ACCEPT_COOKIES" in 1) CLIENT="lynx --accept_all_cookies" ;; *) CLIENT="lynx" ;; esac case "$#" in 0) echo "Usage: ${PROG_NAME} " 1>&2; exit 1 ;; *) ;; esac for term in $@ do query="${query}${term}+" done #url="http://www.google.com/search?q=${query}" url="http://www.google.com/search?client=googlet&q=${query}" exec ${CLIENT} "$url" exit 1