#886958 Please support variant of -c that counts all matches even if more than one per line

Package:
grep
Source:
grep
Description:
GNU grep, egrep and fgrep
Submitter:
Josh Triplett
Date:
2021-10-26 15:30:05 UTC
Severity:
wishlist
#886958#3
Date:
2018-01-11 19:25:00 UTC
From:
To:
grep -c counts matching lines. I'd love to have an option that counts
the number of matches, even if multiple matches occur per line.

This seems easy enough to do by leveraging the same code that -o uses,
but counting rather than printing.

#886958#8
Date:
2021-10-26 15:21:25 UTC
From:
To:
Should this be marked as a duplicate of #532015?

/* era */