[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] df: Adding a --no-headers option, by request of Bruce Dubbs
From: |
Erik Auerswald |
Subject: |
Re: [PATCH] df: Adding a --no-headers option, by request of Bruce Dubbs |
Date: |
Thu, 21 Mar 2019 11:13:11 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Wed, Mar 20, 2019 at 02:22:42PM -0700, Kaz Kylheku (Coreutils) wrote:
> On 2019-03-17 05:27, Ed Neville wrote:
> >Taking suggestions into account, '--no-headers' seems more consistent
> >with ps options.
>
> This loses on character count:
>
> df --no-headers
> df | sed 1d
>
> Fully golfed:
>
> df|sed 1d
"df --no-h" would suffice, use half the processes of the above, avoid
generating data that is read, ignored, and deleted, and avoid the
additional data copies needed to process the data (i.e. do nothing)
in sed. ;-)
More general, table headers are useful for interactive use, but often need
to be ignored when the tool output is used programmatically. It seems to
me as if not generating table headers were a sensible thing to do quite
often (the same applies to footers or legends). I would usually prefer
having an option to disable header/footer/legend creation.
Thanks,
Erik
--
Design your product to please the users.
-- Paul Graham