diff --git a/.config/scripts/mp3cat_all_subdirs.sh b/.config/scripts/mp3cat_all_subdirs.sh index 4562a8e..ef3a77a 100755 --- a/.config/scripts/mp3cat_all_subdirs.sh +++ b/.config/scripts/mp3cat_all_subdirs.sh @@ -4,7 +4,10 @@ for d in ./*; do f=${d:2} cd "$d" echo ${f}.mp3 - mp3cat -c 1 ./*.mp3 -o "${f}.mp3" + # find all mp3s, sort them (e.g. 100 after 99, not after 10), + # get only filenames, handle spaces, and pass list to mp3cat + find . -iname "*.mp3" -exec basename {} \; | sort -h | xargs -d '\n' mp3cat -c 1 -o "${f}.mp3" +# mp3cat -c 1 ./*.mp3 -o "${f}.mp3" mv "${f}.mp3" ../ cd .. fi