Created
January 16, 2013 10:16
-
-
Save PierrickKoch/4546130 to your computer and use it in GitHub Desktop.
replace in code and doc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| STR_ORIG="_blendobj" | |
| STR_REPL="_blender_object" | |
| files=$(grep -rlF "${STR_ORIG}" . --include=*.{py,rst} --exclude-dir="build" --exclude-dir=".git") | |
| # --exclude="${0}" --exclude="*.pyc" --exclude="*.blend" | |
| for f in $files; do | |
| sed -i "s/${STR_ORIG}/${STR_REPL}/g" $f | |
| done | |
| echo "done" | |
| grep "${STR_ORIG}" . -lr --exclude="*.pyc" --exclude-dir="build" --exclude-dir=".git" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment