.ogg to .mp3

ogg2mp3 is a script to convert an .ogg music-file to an mp3-file

script
BASE="`echo ${1} | sed s/.ogg$//`" ARTIST="`ogginfo "${1}"|grep -i artist | awk -F = '{print $2}'`" ALBUM="`ogginfo "${1}" |grep -i album | awk -F = '{print $2}'`" TRACK="`ogginfo "${1}"|grep -i tracknumber|awk -F = '{print $2}'`" TITLE="`ogginfo "${1}" |grep -i title | awk -F = '{print $2}'`" ogg123 -q -d wav -f - "${1}" \ | lame --quiet --preset cd - "${BASE}.mp3" id3tag --artist="${ARTIST}" --album="${ALBUM}" \ --track=$TRACK --song="${TITLE}" "${BASE}.mp3"
 * 1) !/bin/sh

usage
ought to be invoked like so: find /path -name \*.ogg -exec ogg2mp3 {} \; since it only handles one file at a time.