#!/bin/sh # mp3 to wav script # # Author Thorsten Gunkel # # Syntax: mp32wav file1.mp3 file2.mp3 ... # # --- 09.04.2003 Thorsten Gunkel --- # * Split 2wav into mp32wav and ogg2wav # --- 01.10.2002 Thorsten Gunkel --- # * Replaced mpg123 with mpg321. # --- Initial Release --- # decoder="nice /usr/bin/mpg321 --stereo -w \"\$ofilename\" \"\$ifilename\"" suffix="mp3" # --- 2wav --- # nr of parameters numb=$# # do while there are parameters while [ $numb -gt 0 ] do ifilename="$1"; shift; numb=`expr $numb - 1` ofilename="`echo "$ifilename" | sed s/".$suffix"$/".wav"/`" echo "< $ifilename" # ignore files with wrong suffix if [ "$ifilename" != "$ofilename" -a ! -e "$ofilename" ]; then echo "> $ofilename" eval "$decoder" errornr=$? echo echo ">--------------" echo else echo echo "XXX Destination file already exists or wrong input file!" echo fi done # --- 2wav ---