Skip to content

Instantly share code, notes, and snippets.

@veltman
Created January 5, 2016 18:47
Show Gist options
  • 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