A NOTE has been added to this issue. 
====================================================================== 
https://www.austingroupbugs.net/view.php?id=1915 
====================================================================== 
Reported By:                steffen
Assigned To:                
====================================================================== 
Project:                    1003.1(2016/18)/Issue7+TC2
Issue ID:                   1915
Category:                   Shell and Utilities
Type:                       Clarification Requested
Severity:                   Editorial
Priority:                   normal
Status:                     New
Name:                       steffen 
Organization:                
User Reference:              
Section:                    2.5.2 
Page Number:                2479 
Line Number:                80382 
Interp Status:              --- 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2025-03-17 19:17 UTC
Last Modified:              2025-04-17 10:00 UTC
====================================================================== 
Summary:                    clarification of 2.6.5 field splitting of 2.5.2
special parameter $*
====================================================================== 

---------------------------------------------------------------------- 
 (0007138) geoffclare (manager) - 2025-04-17 10:00
 https://www.austingroupbugs.net/view.php?id=1915#c7138 
---------------------------------------------------------------------- 
Here is a much simpler test script which eliminates the unspecified behaviour
and shows clearly the issue that Steffen has identified:
<pre>set a: a
IFS=:
printf '[%s]\n' $*</pre>
I get two different results with this script: ksh93 and dash produce:<pre>[a]
[a]</pre>but ksh88, bash and mksh produce:<pre>[a]
[]
[a]</pre>
The standard requires the ksh93/dash behaviour.  Shells which first do a quoted
expansion and then split it end up splitting "a::a" which produces the extra
empty field. This difference happens because IFS characters are terminators not
separators (as stated in the RATIONALE on the sh page). 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2025-03-17 19:17 steffen        New Issue                                    
2025-03-18 10:31 geoffclare     Note Added: 0007122                          
2025-03-18 11:29 lanodan        Note Added: 0007123                          
2025-03-18 11:32 lanodan        Note Edited: 0007123                         
2025-03-18 12:11 geoffclare     Note Added: 0007124                          
2025-04-17 10:00 geoffclare     Note Added: 0007138                          
======================================================================


  • [1003.1(20... Austin Group Issue Tracker via austin-group-l at The Open Group
    • Re: [... Steffen Nurpmeso via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
      • R... Steffen Nurpmeso via austin-group-l at The Open Group
        • ... Geoff Clare via austin-group-l at The Open Group
          • ... stef...@sdaoden.eu via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group
    • [1003... Austin Group Issue Tracker via austin-group-l at The Open Group

Reply via email to