GNU shellery

2017-10-01 Thread coypu
Hi 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. Cost: a hard link. Index: Makefile

Re: gnu shellery

2017-10-01 Thread coypu
minus using optind uninitialized

Re: GNU shellery

2017-10-01 Thread Valery Ushakov
co...@sdf.org 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.

Re: GNU shellery

2017-10-01 Thread Thor Lancelot Simon
On Sun, Oct 01, 2017 at 03:24:06PM +, Valery Ushakov wrote: > > It doesn't work the same for multiple files. I guess the question is whether we ought to have this if it can be made to work the same way for multiple files. My inclination is "yes". It's low risk (unlike, say, modifying the pa

Re: gnu shellery

2017-10-01 Thread coypu
adjusted per comments from uwe, to match head (and gnu) code copied matching head. add options to tail: -q (never print header of filename) -v (always print header of filename) same as head, same as gnu tail add tac which is like tail -rq Index: Makefile

Re: GNU shellery

2017-10-01 Thread Robert Elz
Date:Sun, 1 Oct 2017 11:53:05 -0400 From:Thor Lancelot Simon Message-ID: <20171001155305.ga27...@panix.com> | It's low risk (unlike, say, modifying the parser in the shell ;-)), Nah - that's easy, no risk at all! | And, frankly, I like the name ("tac") So do I,

Re: GNU shellery

2017-10-01 Thread maya
On Mon, Oct 02, 2017 at 01:34:26AM +0700, Robert Elz wrote: > Date:Sun, 1 Oct 2017 11:53:05 -0400 > From:Thor Lancelot Simon > Message-ID: <20171001155305.ga27...@panix.com> > > | It's low risk (unlike, say, modifying the parser in the shell ;-)), > > Nah - that's

Re: GNU shellery

2017-10-01 Thread Robert Elz
Date:Sun, 1 Oct 2017 19:27:15 + From:m...@netbsd.org Message-ID: <20171001192715.ga21...@homeworld.netbsd.org> | I've done this, and added a man page. In the man page, alter (in this part) | +.Sh DESCRIPTION | +This displays the contents of each of each of

Re: GNU shellery

2017-10-01 Thread Thor Lancelot Simon
On Mon, Oct 02, 2017 at 02:48:12AM +0700, Robert Elz wrote: > > With this, just commit it (don't forget the set lists). What he said. Thor

Re: GNU shellery

2017-10-01 Thread Kamil Rytarowski
On 01.10.2017 20:34, Robert Elz wrote: > So do I, I used to have a tac command, and I miss it. What are the immediate users of this command? Is something broken? Are we in need of patching something? Does it solve some problem that "tail -r" cannot solve? I've checked pkgsrc and we are not patchi

Re: GNU shellery

2017-10-01 Thread David Holland
On Sun, Oct 01, 2017 at 10:03:10PM +0200, Kamil Rytarowski wrote: > > So do I, I used to have a tac command, and I miss it. > > What are the immediate users of this command? Is something broken? Are > we in need of patching something? Does it solve some problem that "tail > -r" cannot solve?

Re: GNU shellery

2017-10-01 Thread Robert Elz
Date:Sun, 1 Oct 2017 22:03:10 +0200 From:Kamil Rytarowski Message-ID: <8ec01cd2-20b8-8c32-5e7f-fd2f8b044...@gmx.com> | What are the immediate users of this command? Is something broken? Are | we in need of patching something? Does it solve some problem that "tail

Re: GNU shellery

2017-10-01 Thread Kamil Rytarowski
On 01.10.2017 23:04, Robert Elz wrote: > ps: the tac in gnu coreutils is by no means "original" - the tac command > way predates GNU - I forget who created it initially, but the real original > (non GPL'd) version could probably be found if there was a good reason > for that. > I see, so if this