Last active
August 29, 2015 14:04
-
-
Save tranch/a65d048911585a761551 to your computer and use it in GitHub Desktop.
编码转换
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 | |
for i in $(find -name '*.ext'); do | |
encoding=$(file -bi "$i" | sed -e 's/.*[ ]charset=//'); | |
iconv -f $encoding -t UTF-8 -o "$i" "$i"; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment