Skip to content

Instantly share code, notes, and snippets.

@veltman
Created January 5, 2016 18:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save veltman/df317e2738742deb99d9 to your computer and use it in GitHub Desktop.
Save veltman/df317e2738742deb99d9 to your computer and use it in GitHub Desktop.
Recursive in-place sed replacement from a list of files
for x in `grep -rl 'onlyfilesthatcontainthis' *`; do sed -i '' 's/replacethis/withthis/' $x; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment