in reply to grep -A10 oneliner?
perl -wne'print if /pattern/..(/pattern/&&($.=-10),$.>=0)' [download]