Convert FLAC to MP3

These days I needed to convert some FLAC (Free Lossless Audio Codec) audio files to mp3. As usual when dealing with audio/video formats, there are lots of (useless) tools available on the internet, most of them being shareware or even voruses (windows). Fortunately, this is a strength of Linux … at least if you are used to the console. All you need is lame and the necessary codecs (use apt-cache search to find what you need).

for file in *flac ; do flac -dc "$file" | lame -h - "${file%flac}mp3" ; done