grep, N строк до, N строк после
Очень полезная штука для анализа логов через grep.
Выводит N строк до совпадения, N строк после:
-A NUM, --after-context=NUM
Print NUM lines of trailing context after matching lines.
Places a line containing -- between contiguous groups of
matches.
-B NUM, --before-context=NUM
Print NUM lines of leading context before matching lines.
Places a line containing -- between contiguous groups of
matches.