iconv-转换文件编码
iconv -f encoding \[-t encoding\] \[inputfile\]...参数
描述
# 批量修改文件编码格式
for filename in `ls`;do iconv -f UTF-8 -t GBK $filename -o $filename;done
# 单个文件转换
iconv -f UTF-8 -t GBK filename -o filename
错误处理
最后更新于
iconv -f encoding \[-t encoding\] \[inputfile\]...# 批量修改文件编码格式
for filename in `ls`;do iconv -f UTF-8 -t GBK $filename -o $filename;done
# 单个文件转换
iconv -f UTF-8 -t GBK filename -o filename
最后更新于
iconv -c -f UTF-8 -t GBK /tmp/jsc.jsc_org_customer.txt -o /tmp/jsc.jsc_org_customer.2.txt