Search Wikipedia using the command line

This post describes how you can search Wikipedia from the command line using a DNS tool like nslookup in Windows or dig in linux.
Handy if you don’t wan’t to open a Internet browser to do a simple Wikipedia query.

Windows
This is how it’s done in Windows

  1. Choose Start -> Run
  2. Write “cmd” and press OK
  3. Write “nslookup” and press ENTER
  4. Write “set type=txt” and press ENTER
  5. Write <topic>.wp.dg.cx and press ENTER

Using linux
This is how it’s done from a console window in linux

# dig +short txt search_keyword.wp.dg.cx

Example

# dig +short txt oslo.wp.dg.cx
"(formerly Christiania) is the capital and largest city in Norway. Metropolitan Oslo or the Greater Oslo Region makes up the third largest urban area in Scandinavia after Metropolitan Stockholm and Metropolitan Copenhagen. http://en.wikipedia.org/wiki/Oslo"

Source: http://lifehacker.com/5329014/search-wikipedia-from-the-command-line