Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Fix ugly file names (a simple shell function)
fix () {
for x in *
do
mv -- "$x" `echo "$x" | sed 's/[^-.a-zA-Z0-9]\+/-/g'` 2> /dev/null
done
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment