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.