Script to get wiki summery for given query

 

Recently I found a script to get wiki summery. I thought it will help everyone who are using Wikipedia regularly.

Following is the script and I am added it in wiki.sh

blah=`echo $@ | sed -e ‘s/ /_/g’`; dig +short txt $blah.wp.dg.cx;

Now run wiki.sh script from your command line as shown below.

Syntax:

$ sh wiki.sh <Input Query>

Example:

$ sh wiki.sh richard branson

Output:

“Sir Richard Charles Nicholas Branson (born 18 July 1950) is an English industrialist, best known for his Virgin brand of over 360 companies. Branson’s first successful business venture was at age 16, when he published a magazine called Student. He then se” “t up an audio record mail-order business in 1970. In 1972, he opened a chain of record stores, Virgin Records, later known… http://a.vu/w:Richard_Branson&#8221;

-Sany

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s