Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save adamvr/750692 to your computer and use it in GitHub Desktop.
Save adamvr/750692 to your computer and use it in GitHub Desktop.
Sets the id3v2 tags for all the files mp3 files in the current directory. Expects files of the form "x - y - dd.mp3"
for i in *.mp3
do
num=`echo "$i" | awk -F ' - ' '{print substr($3,1,2)}'`
max=`echo "$i" | awk -F ' - ' '/END/ {print end} {end = substr($3,1,2)}'
id3v2 -a "artist" -A "album" -t "artist - album - track $num" -T "$num/$end"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment