bug-findutils
[Top][All Lists]
Advanced

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

Re: option to continue on exit status 255 (patch incl)


From: sinno
Subject: Re: option to continue on exit status 255 (patch incl)
Date: Thu, 14 Aug 2008 18:49:46 -0400
User-agent: Mutt/1.5.16 (2007-06-09)

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 address@hidden "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. 
        




reply via email to

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