Bon � savoir aussi que Google livre un API en java (beta?) pour "web services", tr�s interessant, il y a �galement qlqs examples pour comprendre: http://api.google.com
Wei > -----Original Message----- > From: F�lix Hauri [mailto:[EMAIL PROTECTED]] > Sent: dimanche, 28. avril 2002 10:38 > To: Groupe Utilisateurs Linux L�man > Subject: Truc et astuce pour bash2: GoogleSearch > > > J'avais fait d'abord un alias, > puis un alias de deux lignes, > maintenant, il s'agit d'une phonction d'une quarantaine de lignes, > � ajouter � la fin du fichier $HOME/.bashrc, > pour cr�er une fonction googlesearch, > utilisable depuis bash, > avec un parametre -ll pour linux-l�man;-) > > -------------------------- Add to Bash RC File --------------------- > function googlesearch { > browser=`which w3m` > urlbase="http://www.google.com/linux?q=" > finalcmde="" > while [ "${1:0:1}" = "-" ] ;do > case $1 in > -b|--browser ) > shift > browser=$1 > shift > ;; > -n|--netscape ) > browser=`which netscape` > shift > ;; > -r|--root|-o|--other ) > urlbase="http://www.google.com/search?q=" > shift > ;; > -ll|-linux-leman|-a|-alphanet ) > url="http://search.alphanet.ch/cgi-bin/search.cgi?" > opt="max_results=10&type=short&domain=ml-linux-leman" > urlbase="$url$opt&query=" > shift > ;; > -p|--print ) > finalcmde="echo" > shift > esac > done > export urlbase > url=$( > echo -n "$@"|\ > perl -w -e ' > use strict; > use URI::Escape; > > print $ENV{"urlbase"}. > uri_escape(<>)."\n"; > ' > ) > $finalcmde $browser "$url" > } > export function googlesearch > -------------------------- Add to Bash RC File --------------------- > > > -- > F�lix Hauri - <[EMAIL PROTECTED]> - http://www.f-hauri.ch > > -- > http://www-internal.alphanet.ch/linux-leman/ avant de poser > une question. Ouais, pour se d�sabonner aussi. > ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com ********************************************************************** -- http://www-internal.alphanet.ch/linux-leman/ avant de poser une question. Ouais, pour se d�sabonner aussi.
