Possibly better served by an awk script and a more detailed tracks file, but it's a nice quick and dirty solution.
Also scraping the tracks file from wikipedia or elsewhere would be cool too.
| 1;Sultans Of Swing;Private Investigations: The Best of Dire Straits and Mark Knopfler;Mark Knopfler;20;2005 |
| cat tracks | while read line | |
| do | |
| num=`echo $line | cut -d';' -f1` | |
| track=`echo $line | cut -d';' -f2` | |
| artist=`echo $line | cut -d';' -f4` | |
| album=`echo $line | cut -d';' -f3` | |
| genre=`echo $line | cut -d';' -f5` | |
| year=`echo $line | cut -d';' -f6` | |
| id3v2 -T "$num" -t "$track" -a "$artist" -A "$album" -g "$genre" -y "$year" "${track}.mp3" | |
| done |