Skip to content

Instantly share code, notes, and snippets.

@kuba--
Last active January 24, 2024 17:55
Show Gist options
  • Save kuba--/ae6edfe4d6e61338b8ef363a186772e6 to your computer and use it in GitHub Desktop.
Save kuba--/ae6edfe4d6e61338b8ef363a186772e6 to your computer and use it in GitHub Desktop.
Music files
for i in 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30; do find . -type f -name "${i}*" -print ; done > /tmp/files
cat /tmp/files | while read line || [[ -n $line ]]; do d=`dirname "${line}"`; b1=`basename "${line}"`; b2=`basename "${line}" | cut -c4-`; mv "${d}/${b1}" "${d}/${b2}"; done
find . -type f -name "*.m4a" -exec ffmpeg -v 5 -y -i '{}' -acodec libmp3lame -ac 2 -ab 192k '{}'.mp3 \; -print
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment