Last active
September 18, 2019 17:28
-
-
Save l-modolo/4f27f22d1876c9df52f4 to your computer and use it in GitHub Desktop.
remove all non ASCII character from file/folder names in a file tree
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/sh | |
# remove all non ASCII character from file/folder names in a file tree | |
convmv -f utf8 -t ASCII -r . 2>&1 | grep ascii | perl -pe "s/ascii doesn't cover all needed characters for: //g" | awk '{system("mv "$0" \"$(echo "$0" | uconv -t ASCII -x nfd -c )\"")}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment