I've got a list of files that I would like to search for a pattern with ripgrep.
How can this be done?
ripgrep accepts file paths as arguments. So just pass your files as arguments:
rg pattern file1 file2 ... If your list is in a file, with one path per line, then use xargs:
xargs -d '\n' -a list-file rg pattern Or if it's a list generated from find, then:
find ./ ... -print0 | xargs -0 rg pattern find . -iname '*finde_me*.md' -print0 | xargs -0 rg 'search term' rg 'search term' -g '*finde_me*.md' :-) find is single threaded and ripgrep is multi-threaded. Why not try both and compare them for your use case?