The variables are automatically populated according to whether or not there are *.ogg files in the current directory.
for X in *.ogg <-- this sets X to the name of an ogg file in the current directory. The loop repeats once for each ogg file.
Y=${X%.*} <-- This sets Y to the value of $X without the filename extension.
This script works only for a single directory, so you'd need to cd to the artist's folder, run the script, cd to the next artist directory and run the script, etc.
If you want to do this automatically from mu51c you'll need to nest this loop in another one.
I haven't tested, but it would be something like this....
for D in /mnt/hda4/mu51c/*; do
if [ -d "$D"]; then # if it's a subdirectory in mu51c
cd "$D"
for X in *.ogg ; do
Y=${X%.*}
oggdec $Y.ogg ; lame $Y.wav $Y.mp3 ; /bin/rm $Y.wav
done
fi
done
If this works, it should also work from any directory, so you wouldn't need to cd to /mnt/hda4/mu51c first.