Skip to content

Instantly share code, notes, and snippets.

@mredar
Created May 3, 2017 17:49
Show Gist options
  • Save mredar/a1a0c3bd283a65f090bbf8e34befd34f to your computer and use it in GitHub Desktop.
Save mredar/a1a0c3bd283a65f090bbf8e34befd34f to your computer and use it in GitHub Desktop.
Find and replace text in multiple files from linux CLI
grep -rli 'old-word' * | xargs -i@ sed -i 's/old-word/new-word/g' @
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment