print 1 line of context before and after regexp, with line number
# indicating where the regexp occurred (similar to "grep -A1 -B1")
sed -n -e '/regexp/{=;x;1!p;g;$!N;p;D;}' -e h
Thanks
Sundaram
See the documentation for s2p: perldoc s2p
I think this will do what you want.
Regards,
Rob.