Wikipedia : One of the most important web portal in geek’s life. Whenever I need to search anything I use two things. First open up the Google and then search for the related wikipedia page. Exploring wikipedia page using shell is possible. Interested fact is that we can do it without even opening the cli browser. We can make wikipedia text query over dns for an ip address. I learned this trick from Ajay Sharma (firstname.lastname@example.org). Thanks to him for teaching me this wonderful trick. Let’s explore how to do it :)
We will use ‘dig‘ utility for this purpose. Dig is more popularly known as the DNS lookup Utility. You can find more about it using man pages. Syntax for the text based wikipedia query is : dig +short txt <keyword>.wp.dg.cx . For example if you want to look into the wikipedia page of Linux you need to type something like this : dig +short txt linux.wp.dg.cx . Screenshot of the same is attached below :
For multiple word search having spaces in between them you can use the traditional ‘\’ operator. To grasp the wikipedia page of Free Software Foundation (FSF) we need to type dig +short txt free\ software\ foundation.wp.dg.cx .
Only problem is its quite limited. I am trying to figure out a way through which we can look up the whole page but I think this much is also quite useful as most of the times we came to know about the product by reading one or two lines only. So play with wikipedia using Shell only :)