Skip to content

Instantly share code, notes, and snippets.

@parzonka
Created February 26, 2016 23:41
Show Gist options
  • Save parzonka/7cd1c013f549a84d61b8 to your computer and use it in GitHub Desktop.
Save parzonka/7cd1c013f549a84d61b8 to your computer and use it in GitHub Desktop.
find . -type f -name "*.*" -print0 | LC_ALL=en_US.CP437 xargs -0 sed -i '' -e 's/{{{name}}}/bar/g'
# substitute the string '{{{name}}}' with 'johndoe' in all files (including hidden ones) recursively and in-place
# tested on OSX, it does not creates any strange files based on .DS_STORE
find . -type f -name "*.*" -print0 | LC_ALL=en_US.CP437 xargs -0 sed -i '' -e 's/{{{name}}}/johndoe/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment