Skip to Content
gnux

-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

ShortLongValueDefaultMeaning
-c--countnoneprint only a count of selected lines per FILE

Examples

Count the matching lines in each file

grepx -c '^func ' *.go
Output
main.go:3
util.go:11

Help in the terminal

gnux help grepx --count

On this page