A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1853 ====================================================================== Reported By: geoffclare Assigned To: ====================================================================== Project: 1003.1(2024)/Issue8 Issue ID: 1853 Category: Shell and Utilities Type: Clarification Requested Severity: Objection Priority: normal Status: Under Review Name: Geoff Clare Organization: The Open Group User Reference: Section: xargs Page Number: 3602 Line Number: 123241 Interp Status: --- Final Accepted Text: ====================================================================== Date Submitted: 2024-09-02 14:27 UTC Last Modified: 2024-10-24 16:12 UTC ====================================================================== Summary: xargs -x lost an important detail between Issue 6 and 7 ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0001861 xargs -L broken by <a href="view.php?id... ======================================================================
---------------------------------------------------------------------- (0006937) nick (manager) - 2024-10-24 16:12 https://austingroupbugs.net/view.php?id=1853#c6937 ---------------------------------------------------------------------- On page 3600 line 123148 section xargs (SYNOPSIS), change: <blockquote><pre>xargs [-prtx] [-E <i>eofstr</i>|-0] [<XSI>-I <i>replstr</i>|-L <i>number</i></XSI>|-n <i>number</i>]</pre></blockquote> to: <blockquote><pre>xargs [-prt] [-E <i>eofstr</i>|-0] [<XSI>-I <i>replstr</i>|-L <i>number</i> [-x]|</XSI>-n <i>number</i> [-x]]</pre></blockquote> After page 3600 line 123162 section xargs (DESCRIPTION), add a paragraph: <blockquote>If one or more arguments are read from standard input, each constructed command line shall include at least one argument from standard input; it shall be an error if a command line that will fit in the implied or specified size (see the <b>-s</b> option) cannot be constructed containing even one argument.</blockquote> On page 3601 line 123206 section xargs (OPTIONS, -I), delete: <blockquote>Option <b>-x</b> shall be forced on.</blockquote> On page 3602 line 123241 section xargs (OPTIONS, -x), change: <blockquote>Terminate if a constructed command line will not fit in the implied or specified size (see the <b>-s</b> option above).</blockquote> to: <blockquote>Terminate if a command line containing <i>number</i> arguments (see the <b>-n</b> option) <XSI>or <i>number</i> lines (see the <b>-L</b> option)</XSI> that will fit in the implied or specified size (see the <b>-s</b> option) cannot be constructed. Applications should use the <b>-x</b> option when it would not be appropriate for constructed commands to contain fewer than <i>number</i> arguments; for example, when executing the <i>diff</i> utility with <b>-n</b> 2 in order to compare pairs of files.</blockquote> After page 3605 line 123412 section xargs (RATIONALE), add a paragraph: <blockquote>Editions of this standard between 2008 and 2024 did not require <i>xargs</i> to terminate if <b>-x</b> and <b>-n</b> <i>number</i> were both specified and a command line containing <i>number</i> arguments could not be constructed. This requirement was unintentionally lost while simplifying the description of <b>-x</b>. These editions continued to show (in EXAMPLES) the use of <b>-x</b> to force all executions of <i>diff</i> to be passed two operands. The requirement has now been reinstated. In addition, prior to 2008 it was unclear whether conforming XSI implementations were required to accept <b>-x</b> with <b>-L</b> <i>number</i> (because although this combination was described in the text, the SYNOPSIS did not require it to be accepted). Editions between 2008 and 2024 required the combination to be accepted, but with the same defect as for <b>-x</b> <b>-n</b> <i>number</i>. The requirements for <b>-L</b> now match those for <b>-n</b>. Some implementations accept <b>-x</b> with other options besides <b>-n</b> and <b>-L</b>, but there is no reason for portable applications to use such combinations and this standard does not require them to be accepted.</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2024-09-02 14:27 geoffclare New Issue 2024-09-02 14:27 geoffclare Name => Geoff Clare 2024-09-02 14:27 geoffclare Organization => The Open Group 2024-09-02 14:27 geoffclare Section => xargs 2024-09-02 14:27 geoffclare Page Number => 3602 2024-09-02 14:27 geoffclare Line Number => 123241 2024-09-02 14:27 geoffclare Interp Status => --- 2024-09-02 14:31 geoffclare Note Added: 0006868 2024-09-02 14:33 geoffclare Desired Action Updated 2024-09-05 15:22 Don Cragun Status New => Resolved 2024-09-05 15:22 Don Cragun Resolution Open => Accepted 2024-09-05 15:23 Don Cragun Tag Attached: tc1-2024 2024-10-18 19:05 stephane Note Added: 0006926 2024-10-21 11:33 geoffclare Note Added: 0006933 2024-10-21 11:33 geoffclare Status Resolved => Under Review 2024-10-21 11:33 geoffclare Resolution Accepted => Reopened 2024-10-21 11:35 geoffclare Relationship added related to 0001861 2024-10-24 16:12 nick Note Added: 0006937 ======================================================================
