-
-
Save tjoen/7ca002a556c52fbe42d40ac3a1bbad0f to your computer and use it in GitHub Desktop.
Bash script to create .m3u playlist files for all mp3s in subdirectories
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 | |
# | |
# bash script to create playlist files in music subdirectories | |
# | |
# Steve Carlson (steve@scarlson.co) | |
find . -type d | | |
while read subdir | |
do | |
rm -f *.m3u | |
for filename in "$subdir"/*.mp3 | |
do | |
echo "${filename##*/}" >> ./"$subdir"/"${subdir##*/}.m3u" | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment