The following works fine within the current folder, but I would like it to scan sub folders as well.
for file in *.mp3
do
echo $file
done
Sounds like you are looking for the find command. I haven't tested this, but something along these lines:
files=(`find . -name *.mp3`)
for file in "${files[@]}"; do
echo $file TITLE="id3info "$file" | grep '^=== TIT2' | sed -e 's/.*: //g'" ARTIST="id3info "$file" | grep '^=== TPE1' | sed -e 's/.*: //g'"
done
EDIT: using the array makes the command safe for files with spaces in their names.