Bash script using Lame to convert WAV files to MP3 recursively in sub directories.

I wrote this as the lazy way out because I didn’t want to bring a lot of WAV files back to a local box. I know everything is in artist/album format with plenty of spaces in the file names so this type of thing works perfectly for me.
Of course, you need lame installed.
I hope this helps.

LAMEOPTS="-b 192"
for DIRECTORY in /music/*/*; do
if [ -d "$DIRECTORY" ]; then
echo "$DIRECTORY";
for FILE in "$DIRECTORY"/*.wav ; do
OUTNAME=`basename "$FILE" .wav`.mp3;
echo "$FILE" "$DIRECTORY"/"$OUTNAME";
lame $LAMEOPTS "$FILE" "$DIRECTORY"/"$OUTNAME";
rm "$FILE";
done
fi
done