tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: GNU shellery



coypu%sdf.org@localhost wrote:

> reversing lines currently:
> BSDs: tail -r
> GNU: tac
> 
> Anyone writing portable code: sed '1!G;h;$!d'
> (Yes that actually works)
> 
> Attached diff adds a hard link tac (need set lists adjusted though, and
> I have a man page). it doesn't add any of the GNU tac options.

It doesn't work the same for multiple files.

$ echo a > 1 
$ echo b > 2
$ tac 2 1
b
a
$ tail -r 2 1
==> 2 <==
b

==> 1 <==
a

-uwe



Home | Main Index | Thread Index | Old Index