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

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

On Tue, 27 Dec 2016 16:07:01 +0100
Laslo Hunhold <dev_AT_frign.de> wrote:

> On Tue, 27 Dec 2016 16:05:19 +0100
> Mattias Andrée <maandree_AT_kth.se> wrote:
>
> Hey Mattias,
>
> > 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.
>
> but sort(1) requires sorted input, whereas tac(1) can
> operate on any input.

You sort(1) sorts the input. And yes, tac(1) is more
flexible, but that was the only use case I could think
of off the top of my head. But now I remember that I
have used it a number of times to reverse the output
of find(1) to get directories listed after the files
without the directories.

>
> > 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.
>
> What do the others think?
>
> Cheers
>
> Laslo
>


Received on Tue Dec 27 2016 - 16:37:00 CET

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