skip to content
gill.coffee

Find and replace a term in all files of a directory

Using ripgrep combined with sed utilities, use the snippet below:

Terminal window
rg --files-with-matches <term> | xargs sed -i '' 's/<term>/<new-term>/g'

source