$ man xargs
xargs exits with the following status:
0 if it succeeds
123 if any invocation of the command exited with status 1-125
124 if the command exited with status 255
125 if the command is killed by a signal
126 if the command cannot be run
127 if the command is not found
1 if some other error occurred.
Odd, why is this near the top of the man page, while at the bottom of
most other man pages if they have remembered to mention exit
codes at all.
And, Enhancement Suggestion: add a switch to quit upon any non 0
returns:
$ seq 6 -3 -5 |xargs -n 1 expr 15 /
2
5
expr: division by zero
-5
Want to quit if any errors.
--
http://jidanni.org/ Taiwan(04)25854780
[Prev in Thread]
Current Thread
[Next in Thread]
xargs: add switch to quit if any errors,
Dan Jacobson<=