The only package

The only command-line tool lets you search based
on word patterns or line patterns like never before! Not only can
you search with 'only -l patt' but you can select the n-th match
with '-l n/patt/' and the next 3 lines with '-l /patt/0:3'.