Rocksolid Light

Welcome to novaBBS

register   nodelist   faq  

Your account also provides newsreader access to all groups at news.i2pn2.org port 119 or 563 (TLS)


rocksolid / Programming / Re: None

SubjectAuthor
* bash tac in freebsdRetro Guy
+- NoneAnonymous
`- Re: NoneRetro Guy

1
Subject: bash tac in freebsd
From: retro....@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Organization: novaBBS
Date: Wed, 16 Sep 2020 03:15 UTC
Date: Wed, 16 Sep 2020 03:15:24 +0000
Subject: bash tac in freebsd
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
From: retro....@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
X-Rslight-Site: $2y$10$GkBvC.npjY0BAgyhOkgCEOasfzXre9hIpQBTvD7A9tLcBccmDWmti
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
Organization: novaBBS
Message-ID: <21a99db09c6b3bed821752298ece30fc$1@www.novabbs.com>
View all headers
While working on displaying last user in a thread, I found that bash tac worked well and is much faster that cat as I want to get the latest files first and they're at the end of the overview.

Seems freebsd doesn't have tac, so I used cat on freebsd. Then I tried tail -r on freebsd and it works great, but it doesn't work on Linux (invalid option 'r').

So I'm back to using a different command for each os, but at least I can use tail -r on freebsd now.

I'll eventually get this into pure php, but right now this is the fastest way to gather the info and render the pages. Reading the file in reverse in php is much slower, so still looking into better ways to do this.

Retro Guy

--
Posted on: novaBBS
www.novabbs.com



Subject: None
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Organization: def2
Date: Wed, 16 Sep 2020 06:20 UTC
Path: i2pn2.org!.POSTED!not-for-mail
From: pos...@anon.com (Anonymous)
Newsgroups: rocksolid.programming
Subject: None
Date: Tue, 15 Sep 2020 23:20:59 -0700
Organization: def2
Message-ID: <code.594.27r7r0@anon.com>
References: <21a99db09c6b3bed821752298ece30fc$1@www.novabbs.com>
Content-Type: text/plain; charset=UTF-8
Injection-Info: i2pn2.org; posting-account="def2";
logging-data="1747"; mail-complaints-to="usenet@i2pn2.org"
View all headers
Don't know about freebsd but dragonfly has implemented tac recently. It effectively is tail -rq
https://gitweb.dragonflybsd.org/dragonfly.git/commit/b743b76f8c2cc8315de7eac87507463cccaded9c

--
Posted on def2


Subject: Re: None
From: retro_...@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Organization: RetroBBS
Date: Wed, 16 Sep 2020 06:54 UTC
Path: i2pn2.org!i2pn.org!rocksolid2!.POSTED.localhost!not-for-mail
From: retro_...@retrobbs.rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Subject: Re: None
Date: Tue, 15 Sep 2020 23:54:40 -0700
Organization: RetroBBS
Message-ID: <20200915235440.6be11d68@desktop14.dt>
References: <21a99db09c6b3bed821752298ece30fc$1@www.novabbs.com>
<code.594.27r7r0@anon.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: novabbs.org; posting-account="retrobbs1"; posting-host="localhost:127.0.0.1";
logging-data="30573"; mail-complaints-to="usenet@novabbs.org"
X-Newsreader: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu)
View all headers
On Tue, 15 Sep 2020 23:20:59 -0700
Anonymous <poster@anon.com> wrote:

Don't know about freebsd but dragonfly has implemented tac recently.
It effectively is tail -rq
https://gitweb.dragonflybsd.org/dragonfly.git/commit/b743b76f8c2cc8315de7eac87507463cccaded9c


Strange, I can't get tail -r to work on Debian. (invalid option -- 'r')
Of course tail -rq gives the same result.



1
rocksolid light 0.6.6
clearnet i2p tor