Skip to content

Instantly share code, notes, and snippets.

@richard-to
Created January 17, 2013 06:43
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 richard-to/4554190 to your computer and use it in GitHub Desktop.
Save richard-to/4554190 to your computer and use it in GitHub Desktop.
Replace matches in multiple files. I need to replace snippet with an Xargs version.
for file in $(find . -type f -name '*.php'); do sed s/OLD/NEW/g $file > ../temp/test.php; mv ../temp/test.php $file; done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment