Skip to Content
gnux

-m, --max-count

Stop after NUM selected lines.

An option of grepx.

Usage

grepx -m NUM PATTERNS [FILE]...
grepx --max-count=NUM PATTERNS [FILE]...

Details

ShortLongValueDefaultMeaning
-m--max-countNUMstop after NUM selected lines

Examples

Stop after the first three matches and number them

grepx -n -m 3 'panic' crash.log

Help in the terminal

gnux help grepx --max-count

On this page