转换txt文件的字符编码

Posted by 4Aiur on 04/06/2010 in Shell |

转换txt文件的字符编码

find . -type f -name "*.txt" |\
while read line
do
   if iconv -f GB2312 -t UTF-8 "$line" > /tmp/foo; then
       mv /tmp/foo "$line"
   else
       :
   fi
done

Tags:

Copyright © 2010-2024 4Aiur All rights reserved.
This site is using the Desk Mess Mirrored theme, v2.5, from BuyNowShop.com.