#!/bin/sh # ogg to wav script # # Author Thorsten Gunkel # # Syntax: ogg2wav file1.ogg file2.ogg ... # # --- 09.04.2003 Thorsten Gunkel --- # * Split 2wav into mp32wav and ogg2wav # --- Initial Release --- # decoder="/usr/bin/ogg123 -d wav -f \"\$ofilename\" \"\$ifilename\"" suffix="ogg" # --- 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 ---