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

Re: #518696 ITP: parallel -- build and execute command lines from standard input in parallel]

Samuel Thibault <samuel.thibault@ens-lyon.org> writes:

> Andreas Rottmann, le Mon 09 Mar 2009 11:25:11 +0100, a écrit :
>> Did you know about the `-P' option of GNU xargs?
> Herm, I would have found it if the manpage didn't lack keywords like
> "parallel", "simultaneous", ... Reassigning.
> That being said, I guess xargs lacks one parallel feature:
>  -g       Group output.  Output from each jobs is grouped together and is only printed
>           when the command is finished. STDERR first followed by STDOUT.  -g is the
>           default. Can be reversed with -u.
> A lot of applications (including md5sum) would not necessarily print
> their output atomically and then you get mixed output.  Either we add
> the option to findutils, or we package parallel.
Indeed, that's a very valuable feature (if not essential) when the
commands produce output; I've attached a script that can be used to
verify that "xargs -P" does not do this, can be used like:

xargs -P 5 ./test.sh < /some/text/file


for i in `seq 10`; do
    echo -n "$i "
    sleep 1
Regards, Rotty

Reply to: