Skip to content

Instantly share code, notes, and snippets.

@peacefixation
Last active March 27, 2019 01:40
Show Gist options
  • Save peacefixation/c05284b04754df442d640e327ad7ec97 to your computer and use it in GitHub Desktop.
Save peacefixation/c05284b04754df442d640e327ad7ec97 to your computer and use it in GitHub Desktop.
Find files containing text and replace the text
find /some/path -type f -exec grep 'find this text' -l {} \; -exec sed -i '' 's/find this text/replace with this text/g' {} \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment