Skip to content

Instantly share code, notes, and snippets.

@tuxdna
Forked from anonymous/gist:866473
Created March 11, 2011 20:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tuxdna/866565 to your computer and use it in GitHub Desktop.
Save tuxdna/866565 to your computer and use it in GitHub Desktop.
wikipediaSearch() {
echo -n -e "\n============================================\n\tWelcome to WikiPedia Search"; echo ""; i=1 ; for line in $(lynx --dump "http://www.google.co.in/search?q=$1+site%3Awikipedia.org" | grep http://en.wikipedia.org/wiki | cut -c7-); do echo $i $line; lines[$i]=$line ; i=$(($i+1)); done ; echo -n -e "\n============================================\n\tPlease select the link to open - "; read answer; w3m ${lines[$answer]}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment