Wikipedia from the Command Line February 9, 2006Posted by Carthik in ubuntu.
Philippe Charest shares his home-brewed bash script to get information from Wikipedia on the command line using lynx.
You may have to install lynx first using:
$sudo apt-get install lynx
Nice blog by the way, I just wanted to share a new quick “hack” to obtain information from wikipedia on the command line.
Here is a dirty script that fetches information from wikipedia using lynx:
Into your favorite editor:
lynx -dump "http://en.wikipedia.org/wiki/$1" | less
Then just make the file executable (
$sudo chmod +x) and in your path (or in
Exemple (I named my script wikid)
$wikid "George Bush"
From Wikipedia, the free encyclopedia.
Jump to: navigation, search
George Bush can refer to:
* George W. Bush, George Walker Bush, the 43rd and current
President of the United States of America (2001-present)
* George H. W. Bush, George Herbert Walker Bush, 41st President
of the United States (1989-1993), and father of George W.