One-liner: Convert a Directory of wav files

Usually, when I need to convert many wav files, I'll use a perl script I wrote - its on the Helpfull Apps Page.  But today, I didn't care about ID3 Info or anything like that. I use LAME for commandline encoding and here is the one-liner that took care of the directory:

find ./ *.wav | sed 's, ,\\&,g'| xargs -n1 lame -b -96

fist, find ./ *.wav, gets all of the files ending in .wav. Then, sed 's, ,\\&,g' escapes the spaces so the next part doesn't fail. Next, xargs -n1 passes each file name found one by one to: lame -b -96 which encodes each file at 96kbs and spits them out.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
2 + 1 =
Solve this simple math problem and enter the result. E.g. for 1+3, enter 4.