Converting .wav to .mp3 file format in Linux

I just had a requirement to convert a CD with .wav files to .mp3 format. The first thing which I did was to boot into OpenSuse 11.3 box and launch lame.

e.g. to convert the Test.wav file to Test.mp3, we can use the following syntax,

# lame –h –b 192 Test.wav Test.mp3

We can use above CLI to process set of files using following one-liner assuming all .wav files are in current directory,

# for FILE in `ls *.wav`;do `which lame` –h –b 192 $FILE ${FILE//\.wav}.mp3;done

That's it!

You may also be interested in,
+ Shell script to translate uppercase text to lowercase
+ MD5SUM for all files in a directory
+ FTP file upload using shell script on LINUX/UNIX

Note: We at TechSutram take our ethics very seriously. More information about it can be found here.
Mandar Pise Opinions expressed by techsutram contributors are their own. More details

Mandar is a seasoned software professional for more than a decade. He is Cloud, AI, IoT, Blockchain and Fintech enthusiast. He writes to benefit others from his experiences. His overall goal is to help people learn about the Cloud, AI, IoT, Blockchain and Fintech and the effects they will have economically and socially in the future.


  1. I really think that its a great software and its very helpful for those who don't wanna use MP3 files, they can easy convert them into Linux with help of this software. Thanks for sharing!!!

    Buy Mobile Phone

  2. Just wanna say thank you for the selective information you have distributed, I failed to convert wav to mp3 on linux many times.

    Alice from drm removal

  3. Thanks for the blog loaded with so many information. Stopping by your blog helped me to get what I was looking for. Mp3


    Your valuable comments are welcome. (Moderated)