On Thu, Aug 14, 2008 at 11:42:29AM -0700, Brian Dessent wrote:
>
> Can't you achieve the desired effect portably without requiring any
> xargs special casing with e.g.
>
> (stuff) | xargs -t -i sh -c 'ssh -q [EMAIL PROTECTED] "uname -a"; ret=$?; test
> $ret == 255 && exit 0; exit $ret'
Much thanks, that's actually a fine way to handle my dilemma
that I simply never thought of.
> Or if you don't care what the exit value is,
Naah, don't wanna throw out the baby with the bathwater.
> Although I think I would argue xargs is really not the right tool for
> the job here at all -- you're only using it to substitute {} for a
> variable, and the shell is more than capable of doing that on its own
In my example, agreed. In practice I commonly make use
of '--max-processes'. It's concurrency done the *easy* way!
Thanks again for the shell-test suggestion, and for calling
the existance of 'dsh' to my attention - that appears quite
useful already.