Skip to content

Instantly share code, notes, and snippets.

@bad-mushroom
Last active August 29, 2015 13:57
Show Gist options
  • Save bad-mushroom/9769757 to your computer and use it in GitHub Desktop.
Save bad-mushroom/9769757 to your computer and use it in GitHub Desktop.
Pipe results from grep to sed for search/replace
grep -lr <pattern> ./<dir> | xargs sed -i '' 's/<search-for>/<replace-with>/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment