[comp.os.vms] Windowed search capability?

pjs@aristotle.JPL.NASA.gov (Peter Scott) (10/08/90)

Second try at posting; occasionally xrn gives me a "possible mail
alias loop" and barfs when I post to comp.unix.questions.  Why
only this group, I cannot tell.


I would like to have under Unix the capability I have with the VMS
SEARCH utility to display a window of (m,n) lines around the line(s)
containing the search string found in the file.  I have yet to find
a way of doing it with awk, more, sed, or *grep.

Any solutions?  I don't mind a long command (I can alias it) or even 
a shell script (I suppose there will be the obligatory 1-line solution
in perl :-)) but I don't want a program; I want something that uses
utilities that come with all flavors of Unix (okay, exception made
for perl).

-- 
This is news.  This is your       |    Peter Scott, NASA/JPL/Caltech
brain on news.  Any questions?    |    (pjs@aristotle.jpl.nasa.gov)