-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 08/09/07 11:51, Florian Kulzer wrote: > 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.
Or use basename(1). - -- Ron Johnson, Jr. Jefferson LA USA Give a man a fish, and he eats for a day. Hit him with a fish, and he goes away for good! -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFGu1HnS9HxQb37XmcRAuxhAKDROJfK9dx2QPwvr+jgyUFz7cXQ8QCfVyvb LVICBc+TtSyr1djleMIEK1k= =PqqS -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]