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 .`