The following issue has been SUBMITTED. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1861 
====================================================================== 
Reported By:                stephane
Assigned To:                
====================================================================== 
Project:                    1003.1(2024)/Issue8
Issue ID:                   1861
Category:                   Shell and Utilities
Type:                       Error
Severity:                   Objection
Priority:                   normal
Status:                     New
Name:                       Stephane Chazelas 
Organization:                
User Reference:              
Section:                    xargs utility 
Page Number:                3601 
Line Number:                123207-123214 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-10-11 12:32 UTC
Last Modified:              2024-10-11 12:32 UTC
====================================================================== 
Summary:                    xargs -L broken by
https://www.austingroupbugs.net/view.php?id=243 resolution
Description: 
Between the 2018 and the 2024 editions, the description of the -L option
changed from:

-L  number
    [XSI] The utility shall be executed for each non-empty number
<strong>lines of arguments</strong> from standard input. The last
invocation of utility shall be with fewer lines of arguments if fewer than
number remain. A line is considered to end with the first <newline> unless
the last character of the line is an unescaped <blank>; a trailing
unescaped <blank> signals continuation to the next non-empty line,
inclusive.

To:

-L number
    [XSI] Invoke utility for each set of <strong>number arguments</strong>
from standard input. The last invocation of utility shall be with fewer
arguments if fewer than number remain. If the -0 option is not specified,
each line in the standard input shall be treated as containing one argument
except that empty lines shall be ignored and a line ending with a trailing
unescaped <blank> shall signal continuation to the next non-empty line,
inclusive; such continuation shall result in removal of all trailing
unescaped <blank> characters and all <newline> characters that immediately
follow them from the argument.

(<strong>emphasis</strong> mine).

https://www.austingroupbugs.net/view.php?id=243 was about adding -0, it had no
business changing the behaviour of
-L so radically.

-Ln is to get arguments from n lines, not to treat n lines as one argument
each.

On an input like:

a "b c" d
e\ f
g

xargs -L1 cmd

Is meant to call cmd 3 times, once with "a", "b c" and "d" as arguments,
once with "e f" and once with "g"

Desired Action: 
Revert the wording not related to "-0" to that of the 2018 edition.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-10-11 12:32 stephane       New Issue                                    
2024-10-11 12:32 stephane       Name                      => Stephane Chazelas
2024-10-11 12:32 stephane       Section                   => xargs utility   
2024-10-11 12:32 stephane       Page Number               => 3601            
2024-10-11 12:32 stephane       Line Number               => 123207-123214   
======================================================================


  • [1003.1(2024... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [1003.1... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to