Skip to content

Best way to get a total number of all matches from all files #2722

Answered by BurntSushi
Andrew15-5 asked this question in Q&A
Discussion options

You must be logged in to vote

Nope. You could do rg -o search | wc -l, but your method is almost certainly faster, and perhaps substantially so in some cases.

In general ripgrep doesn't really have any aggregate mode for an entire search. It only has aggregate mode for individual files.

Replies: 2 comments 13 replies

Comment options

You must be logged in to vote
5 replies
@Andrew15-5
Comment options

@BurntSushi
Comment options

@Andrew15-5
Comment options

@BurntSushi
Comment options

@Andrew15-5
Comment options

Answer selected by Andrew15-5
Comment options

You must be logged in to vote
8 replies
@Andrew15-5
Comment options

@BurntSushi
Comment options

@Andrew15-5
Comment options

@BurntSushi
Comment options

@lespea
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants