Re: [hackers] [sbase][PATCH] Add tac(1)

From: Mattias Andrée <maandree_AT_kth.se>
Date: Tue, 27 Dec 2016 16:05:19 +0100

On Tue, 27 Dec 2016 11:29:58 +0100
Laslo Hunhold <dev_AT_frign.de> wrote:

> On Sat, 26 Mar 2016 12:08:28 +0100
> Mattias Andrée <maandree_AT_kth.se> wrote:
>
> Hey Mattias,
>
> > Signed-off-by: Mattias Andrée <maandree_AT_kth.se>
> > ---
> > Makefile | 1 +
> > README | 1 +
> > libutil/getlines.c | 3 ++-
> > tac.1 | 20 ++++++++++++++++
> > tac.c | 69
> > +++++++++++++++++++++++++++++++++++++++++++++ +++++++++
> > text.h | 3 ++-
>
> wouldn't it be better to add the r-flag to tail(1)? I
> personally don't see tac(1) at all in the wild, but prove
> me wrong in case I'm missing something.

I actually use tac(1) a lot, but I can't think of anything
I have used it for right now. However, it can be used for
reversing the output after sort(1), however POSIX specifies
-r for sort(1p) which does this, but chances are your common
user is not aware of this.

I can't see the rationale for adding this behaviour to tail(1).
If it is added to tail, the flag would do two things instead
of one thing: reversing the output, and output the entire file.
It would make more sense to add it to cat(1), perhaps you
men to write “cat”. I would think that this is a good idea,
but since tac(1) already exists and -r for cat(1) doesn't, I
think it is better to go with tac(1), but I'm flexible.

>
> Cheers
>
> Laslo
>


Received on Tue Dec 27 2016 - 16:05:19 CET

This archive was generated by hypermail 2.3.0 : Tue Dec 27 2016 - 16:12:15 CET