Skip to Content
gnux

-C, --context

Print NUM lines of output context; -NUM is the same.

An option of grepx.

Usage

grepx -C NUM PATTERNS [FILE]...
grepx --context=NUM PATTERNS [FILE]...

Details

ShortLongValueDefaultMeaning
-C--contextNUMprint NUM lines of output context; -NUM is the same

Examples

Ignore case and show two lines of context around each match

grepx -i -C 2 'timeout' server.log

Help in the terminal

gnux help grepx --context

On this page