This will give ten lines of a file, starting five lines before the matched expression.
tail +# gives the end of a file starting at # lines from the beginning of the file.
grep -n precedes it's output with the line number of the match and a colon.
cut -ddelimiter -f# uses the colon as a delimiter and returns the first field.
$((expr)) is a bashism that does some math for you. I think it works in Korn, too. If that one doesn't work for you, there are other ways to get the math done. Look at man bc. So, my sample subtracts 5 from the line number and that is used for the first argument to tail.
The second occurrence of the filename is an argument to the tail command at the beginning of the line.
Pipe (|) the whole mess through head, which defaults to 10 lines.
So, you get 10 lines, starting at 5 lines before the match. If you want more, or different, lines, be sure to adjust both the 5 in the double-parentheses and add a -n to head.