A NOTE has been added to this issue. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1872 
====================================================================== 
Reported By:                steffen
Assigned To:                
====================================================================== 
Project:                    1003.1(2024)/Issue8
Issue ID:                   1872
Category:                   Shell and Utilities
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       steffen 
Organization:                
User Reference:              
Section:                    find 
Page Number:                2946 
Line Number:                98444 ff. 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-11-07 21:34 UTC
Last Modified:              2024-11-08 01:40 UTC
====================================================================== 
Summary:                    find: clarify "less safe" statement
====================================================================== 

---------------------------------------------------------------------- 
 (0006952) steffen (reporter) - 2024-11-08 01:40
 https://austingroupbugs.net/view.php?id=1872#c6952 
---------------------------------------------------------------------- 
P.S.: the thread continued and i am about to post (subset):

<code>
 |So it looks like we can fix/enhance xargs in this way in both GNU
 |findutils and Busybox findutils and perhaps elsewhere.  It would also be
 |interesting to know if any implementations exist that already "ignore
 |the trailing non-null bytes".

It seems to me the xargs(1) of the BSDs have a common root with
identical comments, variables (zflag == -0) etc, but slightly
diverged code bases "thereafter"; .. not going to dig that stuff
now, .. but running f-1400, n-1000 and o-0705 (i do not have
OpenBSD 7.6) yet) all interpret the trailer it seems.

  #|f-1400:~$ printf 'a\0b\0c' | xargs -0 printf '<%s>\n'
  <a>
  <b>
  <c>

On OpenIndiana "2024" i see

  #?0|oi-2024:steffen$ printf 'a\0b\0c' | xargs -0 printf '<%s>\n'
  <a>
  <b>
  <c>
  #?0|oi-2024:steffen$ command -v printf xargs
  printf
  /bin/xargs

(xargs also via /usr/gnu/bin/xargs as you say)

 |Another reason for this safer behavior is that it's also more consistent
 |with respect to empty strings.  If "trailing non-null bytes" are passed
 |"as the last argument", then this only occurs if the last argument is
 |non-empty.  Yet xargs otherwise does support empty arguments, except for
 |the last non-null-terminated one.  We'd be removing this inconsistency.

Seems to require changing any xargs(1) i have around.

Which makes the standard *very much* requiring changes for the
future ...  So i take back the "unfortunate".
</code>

Maybe i open an issue for xargs tomorrow, so that the future directions are
pointed to in normal text flow?  Is that do- or desireable? 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-11-07 21:34 steffen        New Issue                                    
2024-11-07 21:34 steffen        Name                      => steffen         
2024-11-07 21:34 steffen        Section                   => find            
2024-11-07 21:34 steffen        Page Number               => 2946            
2024-11-07 21:34 steffen        Line Number               => 98444 ff.       
2024-11-07 21:38 steffen        Note Added: 0006951                          
2024-11-08 01:40 steffen        Note Added: 0006952                          
======================================================================


  • [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
      • Re:... Steffen Nurpmeso 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