a simple oneliner will do:
- Yes someone will kill me for doing it so awfully bloated, it for me it looks straightforward
- get the list of mp3-files
- iterate for every file
- read the filename into $FN
- take the 1st "-" as delimiter and take the 1st field as Track#, store it in $T
- take the 1st "-" as splitter and from the second field to the end split again on the "." and take that as the title, store it in $N
- output to see if its correct parsed
- call id3v2 with apropriate parameters ... I wanted the tracknumber to appear in the title, so its better to read in my mp3-player
-
done
ls *.mp3 | while read FN; do T=$(echo $FN| cut -d - -f 1); N=$(echo $FN| cut -d - -f 2- | cut -d . -f 1); echo $T ' : ' $N ' : ' $FN; id3v2 -t "$T:$N" -T "$T" -A "ALBUM-Foo" -c "" -g 101 -a "ARTIST-Foo" "$FN"; done