Skip to content

Instantly share code, notes, and snippets.

View scottwn's full-sized avatar

Scott Wyman Neagle scottwn

View GitHub Profile
@stevewithington
stevewithington / find-replace-sed.md
Last active June 27, 2024 15:19
Find & Replace within an Entire Directory or Git Repo with sed

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: