mencoder <filename>.wav -oac mp3lame -o <filename>.mp3 to convert the files. there's an excellent man page btw
. you need to have mp3lame support compiled in your mplayer. if not, recompile it.
the easiest way to convert all would be you rename the filenames. and do (assuming the wav files are all in the same directory)
$ for i in *wav; do mencoder "$i" -oac mp3lame -o "$i".mp3; done
this is not elegant because you end up having files named .wav.mp3 instead of plain mp3 but should work. i put the doublequotes because i do't know if the filenames will have whitespaces or not so this works either way. btw: you can script the renaming as well so this should be no big problem.
there's surely a much more elegant way but you don't do this for price winning i assume. so if in doubt use brute force...and do it quick and dirty
good luck, vadkutya
p.s.: peacedog has provided a way to change the ending. haven't seen it. so maybe you should change the script above like this:
$ for i in *wav; do mencoder "$i" -oac mp3lame -o `basename "$i" wav`.mp3; done