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-03-18 12:11 UTC ====================================================================== Summary: clarification of 2.6.5 field splitting of 2.5.2 special parameter $* ======================================================================
---------------------------------------------------------------------- (0007124) geoffclare (manager) - 2025-03-18 12:11 https://www.austingroupbugs.net/view.php?id=1915#c7124 ---------------------------------------------------------------------- > Is the test script output supposed to be consistent across theoretically conforming shells? Two different outputs are expected because of the optional discarding of empty fields (when the expansion occurs in a context where field splitting will be performed). If we disregard posh (which we don't usually pay attention to) and loksh (which I believe is descended from pdksh which had appallingly bad conformance), then you're seeing three behaviours. Unfortunately, ksh88 differs from those three: <pre> $ sha1sum test_ksh88.txt c615e994262cb2a6a6469a0f967ae8feeaa40966 test_ksh88.txt $ sed -n l test_ksh88.txt a a a$ 3,1= a / a ,2=a/a,3=a/a,4=$ 3,*= a a a/ a a a,$ a a a $ 2,1=a a /a a ,2= a / a ,3=/,4=$ 2,*=a a a /a a a ,$ :a: a a$ 4,1=:a:/ a ,2=a/a,3=/,4=a$ 4,*=:a::a::a/ a a a,$ :a: a a$ 4,1=:a:/ a ,2=a/a,3=/,4=a$ 4,*=:a::a::a/ a a a,$ a a a$ 3,1= a / a ,2=a/a,3=a/a,4=$ 3,*= a a a/ a a a,$ </pre> (tested using /usr/xpg4/bin/sh on Solaris 11.4). 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 ======================================================================
