[Fedora] pipe ls to lame syntax
Ashley M. Kirchner
ashley at pcraft.com
Wed Nov 23 02:43:03 UTC 2005
hawat.thufir at gmail.com wrote:
> I know it's something like:
>
> $ls $a | lame $a.mp3
>
> if I end up with one.wav.mp3 no biggie, and speed doesn't matter, I'm
> just trying to get *some* automation.
Why not:
# for file in *.wav ; do lame -h $file `basename $file .wav`.mp3 ; done
This assumes that your file names do not contain spaces in them.
Otherwise you'll have to wrap $file in quotes:
...do lame -h "$file" `basename "$file" .wav`.mp3 ...
The -h option after lame is just a suggestion. You obviously know
what options you want to use.
--
H | I haven't lost my mind; it's backed up on tape somewhere.
+--------------------------------------------------------------------
Ashley M. Kirchner <mailto:ashley at pcraft.com> . 303.442.6410 x130
IT Director / SysAdmin / WebSmith . 800.441.3873 x130
Photo Craft Imaging . 3550 Arapahoe Ave. #6
http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.
More information about the fedora-list
mailing list