Convert .flac and .ape to mp3
andipersti at gmail.com
Sat Jan 6 16:12:42 UTC 2018
On 2018-01-06 16:17, Victor Sudakov wrote:
> Michael Ross wrote:
>> > #!/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 % %.mp3
> I'm sure there are many ways to solve the problem, including writing a
> C program, but a solution in pure sh has its own value and appeal.
Well, you use already the find command, so why don't you use it's full
(Why is looping over finds output bad practice?)
More information about the freebsd-questions