To print count matching lines we can use -c, --count argument with grep command.
-c, --count
grep
seq 100 | grep -c 5 19
Source: Linuxize
Last updated 2 months ago