parallel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Feature request: parallel --halt-on-success, inverse of --halt-on-er


From: Ole Tange
Subject: Re: Feature request: parallel --halt-on-success, inverse of --halt-on-error
Date: Mon, 4 Feb 2013 01:20:15 +0100

On Fri, Feb 1, 2013 at 10:05 AM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]