Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Adapt. Enjoy. Survive.


devel / rocksolid.programming / bash tac in freebsd

SubjectAuthor
* bash tac in freebsdRetro Guy
`* NoneAnonymous
 `- NoneRetro Guy

1
bash tac in freebsd
  rocksolid.programming
Path: i2pn2.org!.POSTED!not-for-mail
From: retro....@rocksolidbbs.com (Retro Guy)
Newsgroups: rocksolid.programming
Subject: bash tac in freebsd
Date: Wed, 16 Sep 2020 03:15:24 +0000
Organization: novaBBS
Message-ID: <21a99db09c6b3bed821752298ece30fc$1@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org; posting-account="retrobbs1";
logging-data="10239"; mail-complaints-to="usenet@i2pn2.org"
User-Agent: Rocksolid Light (news.novabbs.com/getrslight)
X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on novabbs
X-Rslight-Site: $2y$10$GkBvC.npjY0BAgyhOkgCEOasfzXre9hIpQBTvD7A9tLcBccmDWmti
 by: Retro Guy - Wed, 16 Sep 2020 03:15 UTC

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

None
  rocksolid.programming
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"
 by: Anonymous - Wed, 16 Sep 2020 06:20 UTC

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

Re: None
  rocksolid.programming
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)
 by: Retro Guy - Wed, 16 Sep 2020 06:54 UTC

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
server_pubkey.txt

rocksolid light 0.9.5
clearnet tor