List files where searched term occurs more than a Threshold
0
votes
2
answers
37
views
I have a command like
rga --files-with-matches --count-matches --sort path -i -e "use cases?" -e "user stor(y|ies)" -e "Technical debt" -e "Code Quality" -e "software development" -e "Agile Manifesto"
The output is like
a1.pdf:18
a2.pdf:10
a3.pdf:14
....
Here,
:NUM
is number of matches.
I want all files who have more than 10 matches (without the colon and number, so that I can pipe the output to another command). Like:
a1.pdf
a3.pdf
....
I tried .. | cut -d':' -f2
but it only give the number. .. | cut -d':' -f1
only gives the file name.
What might be the solution here?
Asked by Ahmad Ismail
(2998 rep)
Mar 3, 2023, 01:01 AM
Last activity: Mar 3, 2023, 02:19 AM
Last activity: Mar 3, 2023, 02:19 AM