Hello Thérèse, first of all, I have to admit that I don't have access to RT. I wrote the sysadmins to clarify.
I hope you'll find this reply on the regular Findutils mailing list. On 1/23/23 20:02, Therese Godefroy via RT wrote:
Hello Bernhard, Here is the sentence the OP is referring to: "The xargs command will process all its input, building command lines and executing them, unless one of the commands exits with a status of 255 (this will cause xargs to issue an error message and stop) or it reads a line contains the end of file string specified with the ‘--eof’ option." Even with the typo corrected, I find this sentence a little difficult to read. It may help to emphasize its structure, for example by adding numbers: ... unless (1) one of the commands exits with a status of 255 (this will cause xargs to issue an error message and stop) or (2) it reads a line containing the end of file string specified with the ‘--eof’ option." Best regards, Thérèse Le Lun 23 Jan 2023 04:07:04, bf...@posteo.de a écrit :https://www.gnu.org/software/findutils/manual/html_mono/find.html s/a line contains the/a line containing the/
I'm not a native speaker, but I find the existing wording quite okay. What's definitely worth improving is the order of the stop conditions in that sentence: obviously, xargs would stop when the EOF string from a given --eof option is read ... before it can check if the launched command existed with status 255. $ seq 252 258 | xargs/xargs -tn1 --eof=255 sh -c 'exit $1' sh sh -c 'exit $1' sh 252 sh -c 'exit $1' sh 253 sh -c 'exit $1' sh 254 $ seq 252 258 | xargs/xargs -tn1 --eof=256 sh -c 'exit $1' sh sh -c 'exit $1' sh 252 sh -c 'exit $1' sh 253 sh -c 'exit $1' sh 254 sh -c 'exit $1' sh 255 xargs/xargs: sh: exited with status 255; aborting What about the attached? Have a nice day, Berny
From 411717fc7addaef4dc1f923c38714eab4cf735fb Mon Sep 17 00:00:00 2001 From: Bernhard Voelker <m...@bernhard-voelker.de> Date: Wed, 25 Jan 2023 08:26:33 +0100 Subject: [PATCH] doc: improve description bout when xargs stops processing * doc/find.texi (Multiple Files): Clarify better that xargs will stop when reading the EOF string specified with the --eof option, or when a launched command exists with status 255. Switch the two termination conditions to reflect the behavior. Fixes RT #1912852. --- doc/find.texi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/find.texi b/doc/find.texi index e2e746a6..f6c11f6a 100644 --- a/doc/find.texi +++ b/doc/find.texi @@ -2478,11 +2478,13 @@ However, if the command needs to have its standard input be a terminal substitution method or use either the @samp{--arg-file} option or the @samp{--open-tty} option of @code{xargs}. -The @code{xargs} command will process all its input, building command -lines and executing them, unless one of the commands exits with a -status of 255 (this will cause xargs to issue an error message and -stop) or it reads a line contains the end of file string specified -with the @samp{--eof} option. +The @code{xargs} command will usually process all its input, building command +lines and executing them. +The processing stops earlier and immediately if the tool reads a line containing +the end of file string specified with the @samp{--eof} option, +or if one of the launched commands exits with a status of 255. +The latter will cause @code{xargs} to issue an error message and exit with +status 124. @menu * Unsafe File Name Handling:: -- 2.39.0