Created
April 13, 2015 02:54
-
-
Save xdtianyu/a2d6f291fa3dabb8bdf3 to your computer and use it in GitHub Desktop.
Usage: GB2312-UTF8.sh [directory name]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Usage: GB2312-UTF8.sh [directory name] | |
DIR=$1 | |
cd $DIR | |
mkdir utf8 | |
for file in *.txt ; do | |
echo $file | |
iconv -f GB18030 -t UTF-8 $file > utf8/$file | |
done | |
cd - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment