• FLAC to MP3

    sudo apt-get install flac
    sudo apt-get install lame

    for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done

    alias flac2mp3='for f in *.flac; do flac -cd "$f" | lame -b 320 - "${f%.*}".mp3; done'


  • bash lame convertor

     

    #!/bin/sh
    # name of this script: wav2mp3.sh
    # wav to mp3
    
    for i in *.wav; do
     if [ -e "$i" ]; then
       file=`basename "$i" .wav`
       lame -h -b 192 "$i" "$file.mp3"
     fi
    done