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?
grey@teleute:/misc/Music$ for FILE in *.mp3; do echo "$FILE.mp3"; done
Eric Cartman-ComeSailAway.mp3.mp3
Happy Rhodes - Summer.mp3.mp3
Happy Rhodes - The Wretches Gone Awry.mp3.mp3
Happy Rhodes - When The Rain Came Down.mp3.mp3
Johnny Lang - Breakin' Me.mp3.mp3
johnny lang - hit the ground running (1).mp3.mp3
Johnny Lang - Matchbox.mp3.mp3
Johnny Lang - Still Raining.mp3.mp3
Johnny Lang - sugarman.mp3.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.