2014-04-10 10:05 GMT+02:00 Alex Mestiashvili <a...@biotec.tu-dresden.de>:

> On 04/09/2014 11:03 PM, Jonathan Dowland wrote:
>
>> On Wed, Apr 09, 2014 at 03:12:40PM +0200, Alex Mestiashvili wrote:
>>
>>> |
>>>   find . -name "*.png" | parallel -P8 convert -quality 95 {} -geometry
>>> 1280 /tmp/{.}.jpg|
>>>
>> Alternatively
>>
>> find . -name "*.png" -exec convert -quality 95 {} -geometry 1280
>> /tmp/{}.jpg +
>>
>> note '+' not '\;' which denotes to run jobs in parallel (here, not
>> specifying
>> a max concurrency limit)
>>
>>
>>
> Nice, thanks for sharing!  but according the man page
>  "Only one instance of `{}' is allowed within the command"
>
> The benefit of parallel over xargs or find is that it is much more
> flexible with arguments in {}.
> For example in the first convert example png files are converted to jpg.
> With xargs the result will look like $file.png.jpg
> With parallel one can alter arguments in {}, so the end result will be
> $file.jpg


let's say there's no use at all in using find

keep_it_simple_as_possible returns that convert (imagemagik tool) has an
outfile option:

convert [input-option] input-file [output-option] output-file

regards
/raffaele

Reply via email to