[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: parallel echo {1} {2} {3} ::: 6 7 ::: 4 5 ::: 1 2 3 : results out of
From: |
Thor Andreassen |
Subject: |
Re: parallel echo {1} {2} {3} ::: 6 7 ::: 4 5 ::: 1 2 3 : results out of order? |
Date: |
Fri, 15 Mar 2013 14:21:43 +0100 |
On Fri, Mar 15, 2013 at 03:49:23PM +0300, George Marselis wrote:
> hey guys.
>
> i executed the above example from the manual in my bash shell.
>
> i got back the following results:
>
> [gmarselis@4jane ~]$ parallel echo {1} {2} {3} ::: 6 7 ::: 4 5 ::: 1 2 3
> 6 4 1
> 6 4 3
> 6 5 1
> 6 5 2
> 6 5 3
> 7 4 1
> 7 4 2
> 7 4 3
> 7 5 1
> 7 5 2
> 6 4 2
> 7 5 3
>
> i would have guess that { 6, 4, 2 } would have been produced right before
> {6, 4, 3} . is there no guarantee on the order of the results returning?
By default the output is ordered by when a process finishes. If you want the
same order as the input, use the --keep-order switch (or -k for short):
$ parallel -k echo {1} {2} {3} ::: 6 7 ::: 4 5 ::: 1 2 3
6 4 1
6 4 2
6 4 3
6 5 1
6 5 2
6 5 3
7 4 1
7 4 2
7 4 3
7 5 1
7 5 2
7 5 3
--
best regards
Thor Andreassen