Converting mp3 to wav

Nick Estes plug-discuss@lists.plug.phoenix.az.us
Wed, 30 Jan 2002 01:48:03 -0700 (MST)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>         o=$(echo "$i" | sed -e "s/mp3/wav/")
>
> This script lists the mp3 files in the current directory, converts the
> mp3 extention to wav using sed, and then does the conversion.

Be careful when using sed to change extensions, what if you have an mp3
called something like "foo thump3.mp3", sed will turn it into "foo
thuwav.mp3".  I know it's not as cool as using sed to do it, but basename
generally leads to more consistent results in this case.

o="$(basename $i .mp3).wav"

	--Nick

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: pgpenvelope 2.10.2 - http://pgpenvelope.sourceforge.net/

iD8DBQE8V7NMv+hjYTGg7s4RAn8uAKCBGefIgeJOiLhgCmCBoSAdasOcKgCeJLV/
lTbpopqxK/YQvHvSvIfLe5A=
=T9kG
-----END PGP SIGNATURE-----