标签:cee 依赖 port 配置 filter common wrap 服务器 nbsp
#!/bin/bash FILE_SUFFIX="java xml html vm js" # FILE_SUFFIX="vm" file_names="" for x in $FILE_SUFFIX do file_names=`find . -name "*.$x" | xargs file -I | grep -v utf-8 | awk -F " |:" ‘{print $1}‘` for file_name in $file_names do # echo $file_name iconv -f cp936 -t UTF-8 $file_name >$file_name".new" && mv -f "$file_name.new" "$file_name" done echo "$x ok" done find . -name "*.xml" | xargs sed -i "" "/<?xml/s/GBK/UTF-8/g" find . -name "*.xml" | xargs sed -i "" "/<?xml/s/GB2312/UTF-8/g" echo "xml head is ok!" find . -name "pom.xml" | xargs sed -i "" "/<encoding>/s/GBK/UTF-8/g" find . -name "pom.xml" | xargs sed -i "" "/<encoding>/s/GB2312/UTF-8/g" find . -name "pom.xml" | xargs sed -i "" "/project.build.sourceEncoding/s/GBK/UTF-8/g" find . -name "pom.xml" | xargs sed -i "" "/project.reporting.outputEncoding/s/GBK/UTF-8/g" find . -name "pom.xml" | xargs sed -i "" "s/pop-vender-common-pageframe/pop-vender-common-pageframe-utf8/g" echo "pom.xml is ok!" find . -name "*.properties" | xargs sed -i "" "/input.encoding/s/GBK/UTF-8/g" find . -name "*.properties" | xargs sed -i "" "/output.encoding/s/GBK/UTF-8/g" echo "velocity properties is OK!" find . -name "strut*.xml" | xargs sed -i "" ‘/struts.i18n.encoding/s/GBK/UTF-8/g‘ echo "struts xml is ok!" find . -name "*.vm" | xargs sed -i "" "s/\/common\/js\/jdmsg\/jd-msg.js/\/common\/js\/jdmsg\/jd-msg-utf8.js/g" find . -name "*.vm" | xargs sed -i "" "/\/ui.datepicker.js/s/<script t/<script charset=\"GBK\" t/g" find . -name "*.vm" | xargs sed -i "" "/\/jquery-calendar.js/s/<script t/<script charset=\"GBK\" t/g" echo "vm is ok" echo "finished" # echo $file_names
标签:cee 依赖 port 配置 filter common wrap 服务器 nbsp
原文地址:http://www.cnblogs.com/xiaoming0601/p/6369901.html