On Fri, Feb 1, 2013 at 10:05 AM, Ævar Arnfjörð Bjarmason
<[email protected]> wrote:
> I just wrote this to speed up a single-threaded password cracker on an
> 8 core box:
>
> parallel --gnu --halt-on-error 2 'echo {} && (password-cracker
> file && exit 1) || exit 0' ::: {1..8}
>
> I.e. you want to exit as soon as some command returns success since
> the password has been cracker.
>
> Being able to do that as:
>
> parallel --gnu --halt-on-success 2 'echo {} && password-cracker
> file' ::: {1..8}
>
> Would be very neat.
How about:
parallel --halt-on-error 2 'echo {}; not password-cracker file' ::: {1..8}
'not' is part of tangetools: https://github.com/ole-tange/tangetools
/Ole