mp3 to audio CD

Thomas Springer th.springer at gmx.net
Thu Dec 8 02:45:01 UTC 2005


Am Donnerstag, den 08.12.2005, 00:46 +0000 schrieb Paul Smith:

> 
> By the way, if one wants to use lame to get in format wav all mp3
> files in a directory, what should one do?
> 

Though this isn't advanced shell scripting it should what you aked for.
Get an idea on how to use bash. Others use /python/perl/...

>>> Put it in a file
>>> Move file into your path, e.g ~/bin
>>> Chmod u+x



#! /bin/sh
# mp3towav_conversion.sh

number=0

cd $1 || exit 1

for file in *.mp3
do
    wavfile=`echo $file | sed -e "s/mp3/wav/g"`
    echo $"Converting $file ..."
    lame $file $wavfile
    echo $"Done"
    let "number += 1"
done

echo $"$number file(s) converted"

exit 0



$ mp3towav_conversion.sh $/path/to/dir$

Have fun.


Thomas

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20051208/9f2e5891/attachment-0001.sig>


More information about the fedora-list mailing list