Hello,
I have a text file full of records, one record per line.  I'd like to do
a keyword search similar to...

sed -n /keyword/p

but return not only the matching line, I also want the previous three
and the next three with it (if there are less than three in either
direction I want as many as possible).  Since sed is a stream editor I
believe it only receives one line at a time so it may not be possible to
do this, would awk give me the additional capability I need?  How about
sed with a little shell scripting.  I know someone will suggest Perl but
I don't know it and don't really want to learn it today so let's save
that for a last resort.  Any other ideas?

Thanks,
Ben.

_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
http://www.mn-linux.org tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list