Re: less-wide df(1) output
[email protected] (Greg A. Woods)
| Newsgroups | gmane.os.netbsd.devel.general |
|---|---|
| Organization | Planix, Inc.; Toronto, Ontario; Canada |
| Message-ID | <[email protected]> |
[ On Sunday, October 6, 2002 at 20:40:34 (-0400), John F. Woods wrote: ] > Subject: Re: less-wide df(1) output > > > > > The implementation may adjust the spacing of the header line and > > > > the individual data lines so that the information is presented in > > > > orderly columns. > > > Such column alignment is only and option in the specification and though > > with the above qualification it won't make the implemenation > > > non-conformant, it does strictly cause unnecessary differences with the > > strict interpretation of the specification, > > The strict interpretation of the clip from the standard above is that > the implementation may adjust the spacing of the header line and the > individual data lines so that the information is presented in orderly columns. Yes, that's what I agreed with. It's an allowable option. The key word is "may". > An implementation which adjusts the spacing to present deliberately disorderly > columns is probably wrong, however. I'm not sure what you mean by that, other than maybe: "if you don't do it right then you'd best not do it at all." > > and it will cause unnecessary problems with other POSIX tools that only > > work with one field separator character and thus nullifies one of the > > main reasons for wanting "portable" output > > A "portable" script which assumes that only one space separates the fields > is wrong, given the statement from the standard above. I'm sure we all realize that, but examples of this kind of bug are not hard to find. I can remember fixing many myself, some in my own code! :-) -- Greg A. Woods +1 416 218-0098; <[email protected]>; <[email protected]> Planix, Inc. <[email protected]>; VE3TCP; Secrets of the Weird <[email protected]>