Created
June 8, 2014 17:55
-
-
Save anonymous/87c787c4fe86e661e9ed to your computer and use it in GitHub Desktop.
Unspace
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 file in *; do | |
# echo -n $file | |
new_file=$(echo $file|sed -e 's/[^A-Za-z0-9._-]/_/g') | |
if [ "$file" = "$new_file" ]; then | |
# echo " not messing..." | |
continue | |
fi | |
echo "$file => $new_file" | |
mv "$file" $new_file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment