Am 30. Jan, 2002 schwätzte Nick Estes so: > 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" Here you look for .mp3 rather than just mp3. The real key, though, is looking for a pattern at the end of the string. How do you do that in sed? perl -e "s/\.mp3$/.wav/;" That's what you need in the sed match and replace. ciao, der.hans -- # http://home.pages.de/~lufthans/ http://www.DevelopOnline.com/ # Like the maid, I don't do (M$)Windows. - der.hans