Using [ripgrep (
rg
)](https://github.com/BurntSushi/ripgrep) , can I print only the filenames which match a given pattern?
There are two separate things I'm trying to do:
1. Match the pattern to the pathname itself (like ag -g pattern
)
1. Match the pattern to the contents of the file and print only the filename
I can't work out how to do either one.
Asked by Tom Hale
(32922 rep)
Jul 3, 2018, 09:25 AM
Last activity: Dec 3, 2021, 10:10 AM
Last activity: Dec 3, 2021, 10:10 AM