The easy way:

It should be noted that these scripts may be useful in special cases, but that most people looking in the Ubuntu forums for a way to convert .m4a files to .mp3 will probably prefer to use SoundConverter:

apt-get install soundconverter lame

Give it a folder, set the options, and it will find all files needing to be converted, and will preserve the tags.