#!/bin/bash
#将utf-8编码转换为gbk编码
#declare variables int
declare -i i
declare -i count
#statistic files to convert
count=`ls -l|wc -l|awk '{print $1}'`
#begin to convert
for ((i=2;num<=count;i++))
do
file=`ls -l|awk '{print $8}'|sed -n "$num"p`
iconv -f utf-8 -t gbk $file >/tmp/zancun
mv /tmp/zancun $file
done
阅读(2934) | 评论(0) | 转发(0) |