On Tue, Feb 14, 2012 at 1:34 PM, Matthew Story <matthewst...@gmail.com>wrote:

> After reading the man-page, and browsing around the internet for a minute,
> I was just wondering if there is an option in (any) xargs to short-circuit
> on first failure of [utility [arguments]].
>
> e.g.
>
> $ jot - 1 10 | xargs -e -n1 sh -c 'echo "$&"; exit 1' worker || echo $? #
cp error on my part, should not read echo exit 1, just exit 1

> 1
> 1
>
> such that any non-0 exit code in a child process would cause xargs to stop
> processing.  seems like this would be a nice feature to have.
>

apologies for the copy-paste error.

-- 
regards,
matt
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "freebsd-hackers-unsubscr...@freebsd.org"

Reply via email to