#!/bin/bash # After you're satisfied that the script does what # you want, uncomment the five lines that do # the real work. find . -name "*.mp3" -print0 | while read -d $'\0' file do echo "$file" TRACK="${file:2:2}" #The first two characters are the track number TITLE="`echo $file | cut -c20-`" #Remove the first 20 characters. TITLE="${TITLE%.mp3}" #remove the .mp3 from the end. echo "$TITLE" echo "$TRACK" # id3 -y 1991 "$file" # id3 -a "De La Soul" "$file" # id3 -A "De La Soul Is Dead" "$file" # id3 -t "$TITLE" "$file" #set the ID3 title tag to $TITLE # id3 -T "$TRACK" "$file" #set the ID3 track number to $TRACK done