parallel
[Top][All Lists]
Advanced

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

Re: How should --onall work?


From: Ole Tange
Subject: Re: How should --onall work?
Date: Thu, 26 May 2011 22:17:39 +0200

On Thu, May 26, 2011 at 5:45 PM, Ole Tange <tange@gnu.org> wrote:
> I have been convinced that GNU Parallel should have an --onall option.
[...]

I have given it a bit more thought. In addition to the already written
I think it would be useful to not have any arguments for --onall.

If stdin == tty then just run the command once with no arguments:

  parallel --onall -S server1,server2 uptime

Unfortunately that will give nasty surprises when run within a script
from, say, cron, because stdin would then not be a tty, and would then
start reading from stdin. And I would really like parallel to act
predictably.

A solution could be having version of --onall that runs with no
arguments - no matter if stdin == tty:

  parallel --nonall -S server1,server2 uptime

would run:

  parallel --onall -S server1,server2 uptime ::: ''

Please comment.


/Ole



reply via email to

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