I'm sure there is something out there that does this already but I make a lot of CDs and because of this a needed a very quick method for batch converting .mp3 files to .wavs, to be burned to CDR.
This script will loop through all the files in the folder you specify and convert them from .mp3 to .wav
copy the following code and save it in a file mp32wav.sh
1. install mpg123
#Script: mp32wav script (requires mpg123 package)
#Purpose: Loops through a path and convert all the mp3s to wavs
#usage: mp32wav [Path]
mpg123 -b 10000 -s "$x" | sox -t raw -r 44100 -s -w -c2 - "`sed s/mp3/wav/ sedEdit`"
echo "Mp32Wav - Convert Mp3 Files To Wav Files"
echo "script syntax: mp32Wav <path>"
if [ -n "$1" ]; then
for x in *.mp3
let "count += 1"
echo "$x" > sedEdit
echo "$count mp3s found and converted to wavs... [Baileysoft 2005]"
2. make the file executable
sudo apt-get -y install mpg123
3. copy to /usr/bin
chmod +x mp32wav.sh
sudo cp mp32wav.sh /usr/bin/mp32wav
example: mp32wav /tmp/mp3
Converts all the mp3s in /tmp/mp3 to wavs
example: mp32wav `pwd`
converts all mp3s in your current directory to wavs