12 March 2011

Wikipedia Search from Command Line

Add the search function into your ~/.bashrc file

Download search function from Here -
Please notice that this is just one single line in bash :)
this code use w3m command line browser, you can also use other browser
like lynx Or just replace w3m by firefox in above code,
Now just open a new console and run try it..
$ wikipediaSearch "Comparison File System"
Now this command will search on wikipedia and return back some links
with numbers, just type the link number and the link will be opened
into browser (lynx, w3m or firefox )
So we got a cool way to search from Console..
Please note that Double Quote is important ( " " ) other wise, it
will take first word for search..

Tip, this command can also be used for correcting spelling mistake,
for example,
If you give something like

$ wikipediaSearch "Comparizon"
Welcome to WikiPedia Search
Now you got the spelling of Comparison,
I have used Google, but one can use any other Search engine.. like DDG...
Searching from wikipedia native search which sucks.. Google and other
search engine give better results then wikipedia native search itself.
One can also use Grease-monkey script to same in firefox browser.
By- Narendra Sisodiya

No comments: