Subject: Re: less-wide df(1) output
To: NetBSD Miscellaneous Technical Discussion List <tech-misc@netbsd.org>
From: Klaus Klein <kleink@reziprozitaet.de>
List: tech-misc
Date: 10/07/2002 14:41:56
woods@weird.com (Greg A. Woods) writes:
> [ On , October 6, 2002 at 18:34:13 (+0200), Klaus Klein wrote: ]
> > Subject: Re: less-wide df(1) output
> >
> > Greg A. Woods writes:
> >
> > > [ On , October 6, 2002 at 14:03:50 (+0200), Johan Danielsson wrote: ]
> > >
> > > > woods@weird.com (Greg A. Woods) writes:
> > > >
> > > > > secondly only a single space is allowed between fields in
> > > > > '-P' output.
> > > >
> > > > How do you deduce that?
> > >
> > > Read the printf format specification string given in the
> > > standard, as I quoted from it in my post.
> >
> > Your statement is interesting insofar as you've ignored a paragraph
> > which Johan quoted from your original message citing the standard,
> > which said:
> >
> > > 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, but the point should be to keep the implementation using the
> simplest direct interpretation of standard.
I was referring to your original point which was, as quoted above,
that only a single space [character] was allowed between fields.
While I agree that your point of a portable and effortlessly parsable
output may be desirable at times, I haven't yet come across an
implementation deployed where the optional column alignment for human
readers isn't performed. So NetBSD's particular output would be
easier to handle in cut(1) without prior processing, but I'm not
convinced that an application taking advantage of this, which is
broken when used on (supposedly) almost every conforming
implementation, would be quite useful in general.
- Klaus