I'd hate to code the search algorithm myself efficiently, so I might shell out to grep -A 1 -B 1 keyword filename, join the lines together, and do the five word windowing on the results.
In reply to Re: searching for a keyword with context window
by chromatic
in thread searching for a keyword with context window
by fadingjava
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |