shell 脚本自动GBK转UTF8java
for i in `find . -name "*.java"`; do iconv -f gbk -t utf-8 $i > $i.new; done # 若是出现 cannot convert,把对应错误转换的文件.new删掉 find . -name "*.new" | sed 's/\(.*\).new$/mv "&" "\1"/' | sh ## xml code sed -i "" "s/gb2312/UTF-8/g" `grep gb2312 -rl .`