Skip to content

Instantly share code, notes, and snippets.

@laixintao
Created September 3, 2019 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save laixintao/5165bb66f3573bad921fdf48e35b2b32 to your computer and use it in GitHub Desktop.
Save laixintao/5165bb66f3573bad921fdf48e35b2b32 to your computer and use it in GitHub Desktop.
for file in $(fd -x file | rg "UTF-8" | cut -f1 -d":")
do
echo "convert ${file}..."
iconv -f utf8 -t gbk "$file" > "$file.new" &&
mv -f "$file.new" "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment