tags:

views:

48

answers:

1

As the title says i am looking for a way to search through stackoverflow.com using only the command line specifically bash in linux.

Things I need to accomplish :

I just need to get the top 10 answers for my question or even top 5.

Plain Text Output , i.e. strip HTML out if possible.

Also I would prefer if you didnt give a answer that required elinks or something similar.

+2  A: 

here's a rough script to run from command line that does the job

wget 'http://stackoverflow.com/feeds/tag?tagnames=command-line&amp;sort=newest' -qO - | perl -nle ' print $1 if /\<title[^>]+\>([^<]*)/;'|head

It grabs RSS output for a given tag (command-line here) and sort of parses it. To be done properly one would probably want to parse XML in a better way or use some perl rss parser.

catwalk
That's nice. +1
Boldewyn