Bourne - File name Converter
This script will convert any mp3/wav/wma files into neat and tidy naming format,
ls | /bin/egrep -i ".wma|.mp3|.wav" > /dev/null
if [ $? == 0 ]
ls | /bin/egrep -i ".wma|.mp3|.wav" | while read source
dest=$(echo "$source" | /bin/sed 's/^[0-9]*[-,_]//;s/^-//;s/\_/ /g;s/^ *//g;;s/.*/\L&/g;s/-/ - /g;s/ / /g;s/\<./\u&/g;s/...$/\L&/')
/bin/mv -fv "$source" "$dest"
echo -e "\E[31mERROR : No music files found in `pwd`"; tput sgr0
When copying this script to your UNIX terminal, please copy it into a text editor first. This will prevent any special characters being copied across with the script. A good tool to check this is to run cat -e filename.sh within your UNIX shell, this will show you the text and any special characters.
A modified script for the above can also be found here.