首页 > 代码库 > Linux命令之乐--iconv

Linux命令之乐--iconv

用法:

技术分享

 

实际应用:

批量转换文件编码:

[root@wls12c PCK]$ for tfile in `ls -l|awk ‘{print $9}‘`;do echo "iconv -f gbk -t utf-8 "$tfile" -o "$tfile".utf-8";done|tee tochar.shiconv -f gbk -t utf-8 GcDocument_yl.pck -o GcDocument_yl.pck.utf-8iconv -f gbk -t utf-8 GcEstLossUpdate.pck -o GcEstLossUpdate.pck.utf-8iconv -f gbk -t utf-8 GcMedicalOsModify.pck -o GcMedicalOsModify.pck.utf-8

  

 

Linux命令之乐--iconv