manpagez: man pages & more
info grep
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

2.1.5 Context Line Control

Regardless of how these options are set, grep will never print any given line more than once. If the ‘-o’ (‘--only-matching’) option is specified, these options have no effect and a warning is given upon their use.

-A num
--after-context=num

Print num lines of trailing context after matching lines.

-B num
--before-context=num

Print num lines of leading context before matching lines.

-C num
-num
--context=num

Print num lines of leading and trailing output context.

--group-separator=string

When ‘-A’, ‘-B’ or ‘-C’ are in use, print string instead of ‘--’ between groups of lines.

--no-group-separator

When ‘-A’, ‘-B’ or ‘-C’ are in use, do not print a separator between groups of lines.

Here are some points about how grep chooses the separator to print between prefix fields and line content:


[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on June 7, 2014 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.