-
-
Save yingca1/8ed2f3f2904769cce6c7 to your computer and use it in GitHub Desktop.
mac osx search and replace text
This file contains 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
find . -type f -name '*.txt' -exec sed -i '' s/this/that/ {} + | |
find . -name "*.java" -exec sed -i "" 's/com.xxx.R/android.R/g' {} \; | |
grep -nr "@+id" * | |
find . -name "*.java" | xargs sed -i 's/com.xxx.R/android.R/g' | |
find . -name "*.xml" | xargs grep -i -n "@id/" >> output.txt | |
find ../xxx/ -name "*.java" | xargs grep -i -n "com.android.internal.R." >> output.txt | |
find . -name "*.java" | xargs grep -i -n "android.R." | |
find . -name "*.java" | xargs grep -i -n "R\.id\." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment