[ripgrep/FAQ.md at master · BurntSushi/ripgrep · GitHub](https://github.com/BurntSushi/ripgrep/blob/master/FAQ.md#search-and-replace) ```shell-session rg foo --files-with-matches -0 | xargs -0 sed 's/foo/bar/g' ```