On Thu, Aug 09, 2007 at 09:25:20 -0700, Steve Lamb wrote: > Vincent Lefevre wrote: > > Why not zsh (more powerful than bash) or perl? > > Because to some Perl is horrible compared to Python. > > > for FILE in *.wav; do lame -h -b 160 "$FILE" "$FILE.mp3"; done > > Correct me if I'm wrong but wouldn't I just end up with with a bunch of > files named blahblah.wav.mp3?
[...] > So now we have to strip stuff out of the filename which involves at least > a call to cut (properly escaped, of course). Meh, even simple examples in > shell should be avoided. You don't need to use cut; bash can do it directly if you use "${FILE%wav}mp3" as the output filename in the for loop. -- Regards, | http://users.icfo.es/Florian.Kulzer Florian | -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]