人生理想,技术交流加Q:411239339

批量转码

浏览:365次阅读
没有评论

共计 416 个字符,预计需要花费 2 分钟才能阅读完成。

SPATH=”/root/chin”
#/bin/bash
#Auth: Mo
#Desc:
#
DIR=/var/www/html
DPATH=”/newweb”
find ${DIR}   -type d  -exec mkdir -pv ${DPATH}/{}  \;
find ${DIR}  -type f -exec  iconv -f GBK -t UTF-8  {} -o  ${DPATH}/{}  \;
echo “The file Next Listed is not a common file or directory ,please check.”
find  ${DIR}  ! -type f  -a  ! -type d -exec  ls -l {} \;
find  $DPATH -type f -exec sed  -i  -e  ‘s/gb2312/UTF-8/g’  -e ‘s/GB2312/UTF-8/g’ -e ‘s/GBK/UTF-8/g’ -e ‘s/gbk/UTF-8/g’ {} \;
echo ‘ ‘
echo “All Done.”
正文完
创作不易,扫码加点动力
post-qrcode
 0
果较瘦
版权声明:本站原创文章,由 果较瘦 于2013-12-05发表,共计416字。
转载说明:除特殊说明外本站文章皆由果较瘦原创发布,转载请注明出处。