for file in *.mp3; do mv "$file" "${file// /-}" #replace space with - done