For the complete documentation index, see llms.txt. This page is also available as Markdown.

Grep Count Matches

To print count matching lines we can use -c, --count argument with grep command.

Example

seq 100 | grep -c 5
19

Source: Linuxize

Last updated