2009/04 14
以下代码为在linux下, 批量将指定后缀的GBK文件转化为UTF8格式。


for filetype in php txt csv js css conf sql html tpl
do
for i in `find . -name "*.${filetype}"`;
do
mkdir -p `dirname /var/www/target/$i`;
iconv -f gbk -t utf-8 $i -o /var/www/target/$i;
done;
done;


Update: 4月16号修改, 增加 filetype 循环

Posted by rollenc

Last modified on 2009-04-17 05:58

0 Trackbacks

  1. No Trackbacks

0 Comments

  1. No comments

Add Comment


E-Mail addresses will not be displayed and will only be used for E-Mail notifications.