Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # git-replace - Replace strings in git repositorys
- usage() {
- echo "git-replace <search> <replace> [<path>]"
- }
- test "$1" == "--help" && { usage; exit 0; }
- #test -z "$1" -o -z "$2" && { usage; exit 1; }
- test -z "$1" && { usage; exit 1; }
- git grep -l "$1" $3 | xargs sed -i "s|$1|$2|g"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement