That this doesn't already exist as a standard UNIX tool ( I figure there must be).
Update:grep -3 -C [NUM], -NUM, --context[=NUM] Print NUM lines (default 2) of output context. grep -A3 -A NUM, --after-context=NUM Print NUM lines of trailing context after matching lines. grep -B3 -B NUM, --before-context=NUM Print NUM lines of leading context before matching lines.
If by the incredible chance it doesn't, should I submit it as a patch?
Submit a patch regardless. :-)
--k.
In reply to Re: Grepping surrounding lines, is this redundant?
by Kanji
in thread Grepping surrounding lines, is this redundant?
by shotgunefx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |