A NOTE has been added to this issue. 
====================================================================== 
https://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:                     Interpretation Required
Name:                       Stephane Chazelas 
Organization:                
User Reference:              
Section:                    xargs utility 
Page Number:                3601 
Line Number:                123207-123214 
Interp Status:              Proposed 
Final Accepted Text:        https://austingroupbugs.net/view.php?id=1861#c6918 
====================================================================== 
Date Submitted:             2024-10-11 12:32 UTC
Last Modified:              2024-10-21 09:01 UTC
====================================================================== 
Summary:                    xargs -L broken by
https://austingroupbugs.net/view.php?id=243 resolution
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
related to          0000243 Add -print0 to "find"
====================================================================== 

---------------------------------------------------------------------- 
 (0006932) geoffclare (manager) - 2024-10-21 09:01
 https://austingroupbugs.net/view.php?id=1861#c6932 
---------------------------------------------------------------------- 
> it could be that [Solaris] correctly breaks the list into "echo + 00001
00002" so as to fit into those 23 bytes and ignore line boundaries or that
it is broken in a similar way as ast-open's one

Without -s, Solaris handles lines as expected, so not broken like
ast-open's xargs:

$ printf '00001 00002 00003\n00004 00005 00006\n00007 00008 00009\n00010
00011 00012\n' | xargs -L 2 echo +
+ 00001 00002 00003 00004 00005 00006
+ 00007 00008 00009 00010 00011 00012

Experimenting with different -s limits, it seems it will carry args forward
to the next line:

$ printf '00001 00002 00003\n00004 00005 00006\n00007 00008 00009\n00010
00011 00012\n' | xargs -L 2 -s 36 echo +
+ 00001 00002 00003 00004
+ 00005 00006 00007 00008
+ 00009 00010 00011 00012

but in some situations will also end an argument set at the end of a line:

$ printf '00001 00002 00003\n00004 00005 00006\n00007 00008 00009\n00010
00011 00012\n' | xargs -L2 -s 40 echo +
+ 00001 00002 00003 00004 00005
+ 00006 00007 00008 00009
+ 00010 00011 00012

> In any case, it seems to me it would be too late to forbid the
GNU/FreeBSD/NetBSD behaviour in the POSIX specification now.

I agree, it should be made optional whether -L turns on -x. 

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   
2024-10-11 16:28 stephane       Note Added: 0006913                          
2024-10-12 05:57 stephane       Note Added: 0006914                          
2024-10-14 16:13 geoffclare     Note Added: 0006916                          
2024-10-15 05:09 stephane       Note Added: 0006917                          
2024-10-15 05:23 stephane       Note Edited: 0006917                         
2024-10-17 09:08 geoffclare     Note Added: 0006918                          
2024-10-17 09:12 geoffclare     Relationship added       related to 0000243  
2024-10-17 15:12 geoffclare     Note Edited: 0006918                         
2024-10-17 15:12 geoffclare     Interp Status             => Pending         
2024-10-17 15:12 geoffclare     Final Accepted Text       =>
https://austingroupbugs.net/view.php?id=1861#c6918    
2024-10-17 15:12 geoffclare     Status                   New => Interpretation
Required
2024-10-17 15:12 geoffclare     Resolution               Open => Accepted As
Marked
2024-10-17 15:13 geoffclare     Tag Attached: tc1-2024                       
2024-10-17 16:25 agadmin        Interp Status            Pending => Proposed 
2024-10-17 16:25 agadmin        Note Added: 0006921                          
2024-10-18 06:34 stephane       Note Added: 0006922                          
2024-10-18 07:02 stephane       Note Added: 0006923                          
2024-10-18 07:08 stephane       Note Added: 0006924                          
2024-10-18 07:10 stephane       Note Edited: 0006924                         
2024-10-18 08:39 geoffclare     Note Added: 0006925                          
2024-10-18 18:59 stephane       Note Edited: 0006922                         
2024-10-19 20:56 stephane       Note Added: 0006927                          
2024-10-19 21:10 gbrandenrobinsonNote Added: 0006928                          
2024-10-20 07:24 stephane       Note Added: 0006929                          
2024-10-20 08:25 stephane       Note Added: 0006930                          
2024-10-20 19:54 stephane       Note Edited: 0006922                         
2024-10-20 19:57 stephane       Note Edited: 0006922                         
2024-10-20 19:58 stephane       Note Edited: 0006922                         
2024-10-21 06:20 stephane       Note Added: 0006931                          
2024-10-21 09:01 geoffclare     Note Added: 0006932                          
======================================================================


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

Reply via email to