-c, --count
Print only a count of selected lines per FILE.
An option of grepx.
Usage
grepx -c PATTERNS [FILE]...
grepx --count PATTERNS [FILE]...Details
| Short | Long | Value | Default | Meaning |
|---|---|---|---|---|
-c | --count | none | print only a count of selected lines per FILE |
Examples
Count the matching lines in each file
grepx -c '^func ' *.gomain.go:3
util.go:11Help in the terminal
gnux help grepx --count