Skip to content

Instantly share code, notes, and snippets.

@mrkara
Last active December 31, 2016 18:55
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 mrkara/c3688b5d7d13ed90dfcacb3342581414 to your computer and use it in GitHub Desktop.
Save mrkara/c3688b5d7d13ed90dfcacb3342581414 to your computer and use it in GitHub Desktop.

=== Replace a String in Multiple Files in Linux Using Grep and Sed

#Basic Format

grep -rl matchstring somedir/ | xargs sed -i 's/string1/string2/g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment