To add an extension you can simply concatenate it to the original filename using a for loop. For example, suppose you have all (and only) the mp3 files in a given directory, you can do something like
Code:
cd /path/to/dir
for file in *
do
mv "$file" "$file".mp3
done
do some tests on dummy files (or copies of the originals) before actually run the mv command. For the renaming part using information from the mp3 tags, I suggest
eyeD3. For example the command
Code:
eyeD3 --rename="%A - %t" $FILE
will rename the mp3 file using Artist and Title taken from the tag. Take a look at the manual page for other useful format specifications.
Edit: sycamorex beat me! Anyway, I embedded $file within double quotes to manage file names with blank spaces (very common for mp3s).