Convert .flac and .ape to mp3

Michael Ross gmx at
Sat Jan 6 12:12:03 UTC 2018

Am .01.2018, 07:39 Uhr, schrieb Victor Sudakov <vas at>:

> So eventually I will need to write a script to process all the *.ape
> files, probably with bchunk. Which brings the following question. If
> the file and directory names have spaces in them, a simple loop like
> this:
> #!/bin/sh
> for i in `find . -iname '*.ape'`
> do
>   do_something $i
> done
> breaks on spaces.
> What is the sh magic to handle such filenames?

xargs, you may want to run a few conversions in parallel:

find . -iname '*.ape' -print0 | xargs -0 -I% -P<parallel_runs> convert %  

-- Michael

More information about the freebsd-questions mailing list