for i in *.mp3; do ALBUM=`id3tool "$i" | grep Album | cut -d " " -f 3 | \
sed s/" "*$// `; ARTIST=`id3tool "$i" | grep Artist | cut -d " " -f 3 | \ sed s/" "*$// `; "$ARTIST"? && DIR="$ARTIST/"; "$ALBUM"? && DIR=${DIR}${ALBUM}/; "$DIR"? && (mkdir -p "$DIR"; mv "$i" "$DIR/") ; done
It uses id3tool to pull out the album and artist name, it strips some extra crap out of this (unneeded whitespace), then it creates the directory and moves the mp3 into that dir.
Note that using 'for i in *.mp3' works even if you have spaces in the filename.
3 pages link to BashOneLiners:
lib/main.php:944: Notice: PageInfo: Cannot find action page