Browse Source

script to remove "invalid" characters in filenames

master
Julio Biason 11 years ago
commit
9d46398b58
  1. 13
      unspace.sh

13
unspace.sh

@ -0,0 +1,13 @@
#!/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
Loading…
Cancel
Save