Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@danielgomezrico
Created December 10, 2018 16:53
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 danielgomezrico/81a988cca42d33f6f3ab600744f34d2b to your computer and use it in GitHub Desktop.
Save danielgomezrico/81a988cca42d33f6f3ab600744f34d2b to your computer and use it in GitHub Desktop.
Bash - Replace all with find
$ find_replace_all.sh ~/tmp/example/ www.google.com www.other.com
#!/bin/bash
find $1 -type f -exec sed -i "s/$2/$3/g" '{}' \;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment