-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
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-m | --max-count | NUM | stop after NUM selected lines |
Examples
Stop after the first three matches and number them
grepx -n -m 3 'panic' crash.logHelp in the terminal
gnux help grepx --max-count