Skip to content

Instantly share code, notes, and snippets.

@dasch
Created December 30, 2008 16:56
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 dasch/41665 to your computer and use it in GitHub Desktop.
Save dasch/41665 to your computer and use it in GitHub Desktop.
# Replaces "string1" with "string2" recursively
# Approach 1:
find ./ -type f | xargs sed -i 's/string1/string2/'
# Approach 2:
rpl -x'.cpp' -x'.h' -pR "string1" "string2" *
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment