Created
June 12, 2016 03:35
-
-
Save lgyjg/347fb669e545259d18ad97a5aee8bdec to your computer and use it in GitHub Desktop.
批量替换文件中的字符串的shell脚本命令
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
#restore_cancel 代表需要过滤的字符串关键字 | |
# <string name="restore_cancel">@android:string\/cancel<\/string>/g 代表含有该关键字字符串的行该替换成什么样. | |
# res 代表查找路径 | |
sed -i 's/^.*restore_cancel.*$/ <string name="restore_cancel">@android:string\/cancel<\/string>/g' `grep restore_cancel -rl res` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment