Find & Replace within an Entire Directory or Git Repo with sed
If replacing within a directory:
grep -rl 'apples' /dir_to_search_under | xargs sed -i 's/apples/oranges/g'
Or, within an entire git
repository:
git grep -l 'apples' | xargs sed -i 's/apples/oranges/g'
Thanks. :+1