SaidinUnleashed


Group: Members
Posts: 1428
Joined: Mar. 2004 |
 |
Posted: May 12 2005,04:22 |
 |
I seem to find myself relying on google almost as much as I do man, especially from the console.
And it gets tiring to type "links google.com" then whatever I'm wanting to search for.
So I did what any good geek would do, and wrote a script.
Just toss it into /usr/sbin and it works just like man.
For example:Code Sample | google linux small 50mb |
would search google for the words linux, small, and 50mb.
I made it to work with up to 9 words, but it's easy to increase this, and I'm sure you will be able to figure it out. :P But I rarely search for more than 6 words, so I figure 9 is plenty for most people.
Anyways, enough talk. Here's the code:
Code Sample | #/bin/bash
# man-like clone that searches google # created by SaidinUnleashed, aka J.P. Nimmo
s1=$1 s2=$2 s3=$3 s4=$4 s5=$5 s6=$6 s7=$7 s8=$8 s9=$9
exec links http://www.google.com/search?\&q\=$s1\+$s2\+$s3\+$s4\+$s5\+$s6\+$s7\+$s8\+$s9 |
Remember to save it as "google" , and as root, move it to /usr/sbin, then as root, chmod +x it to make it executable by everyone.
Hope you find this handy.
-J.P.
-------------- They say if you play a Microsoft CD backwards, you hear satanic messages. That's nothing, cause if you play it forwards, it installs Windows.
Unleash the power of the TILDE~~~
|