The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1826 
====================================================================== 
Reported By:                lanodan
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1826
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Comment
Priority:                   normal
Status:                     New
Name:                       Haelwenn Monnier 
Organization:                
User Reference:              
Section:                    du 
Page Number:                2808 
Line Number:                93064-93067 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2024-04-07 01:48 UTC
Last Modified:              2024-04-07 01:48 UTC
====================================================================== 
Summary:                    du: space used between <size> and <pathname>, while
common implementations use tab
Description: 
Ones where a tab is used as separator, version and permalinks as observance
point:
- BSD 4.1 (literal)
https://github.com/dspinellis/unix-history-repo/blob/6e5f0f7526b38c1ab3620133892ecf1fe15a1d2b/usr/src/usr.bin/du/du.c#L158
- NetBSD
http://cvsweb.netbsd.org/bsdweb.cgi/src/usr.bin/du/du.c?rev=1.36&content-type=text/x-cvsweb-markup&only_with_tag=MAIN
- OpenBSD
https://cvsweb.openbsd.org/src/usr.bin/du/du.c?rev=1.33&content-type=text/x-cvsweb-markup
- FreeBSD
https://cgit.freebsd.org/src/tree/usr.bin/du/du.c?id=0b8224d1cc9dc6c9778ba04a75b2c8d47e5d7481#n316
- MacOS
https://github.com/apple-oss-distributions/file_cmds/blob/file_cmds-430.100.5/du/du.c#L402
- GNU coreutils 9.4, even with POSIXLY_CORRECT=1 and POSIX_ME_HARDER=1
- BusyBox 1.36.1
- ToyBox
https://github.com/landley/toybox/blob/9303bd8ae667ef6385f070aa4937ff8746a2ff59/toys/posix/du.c#L75

illumos being the only one I could find where when compiled for
/usr/xpg4/bin/du rather than /usr/bin/du, a space is used:
https://github.com/illumos/illumos-gate/blob/1979231e1e29c981e5d1e6cee60f2db46d052b00/usr/src/cmd/du/du.c#L72-L81

A hunch I have is the literal tab degrading into a space on POSIX side of
things.
Desired Action: 
Given how widespread tab separation is: Either changing the specified
format of du(1), line 93067 on Draft 4.1, from "%d %s\n" to "%d\t%s\n" or
clarifying that either space or tab can be used as separator.
====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2024-04-07 01:48 lanodan        New Issue                                    
2024-04-07 01:48 lanodan        Name                      => Haelwenn Monnier
2024-04-07 01:48 lanodan        Section                   => du              
2024-04-07 01:48 lanodan        Page Number               => 2808            
2024-04-07 01:48 lanodan        Line Number               => 93064-93067     
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to