On 15 Apr 2024, at 10:34, Mike Wayne wrote:
> Any idea what package jq might be in? Never heard of it.
https://www.freshports.org/textproc/jq/
Sean
___
Semibug mailing list
Semibug@lists.nycbug.org
On Sat, Apr 13, 2024 at 08:48:41AM -0700, ad...@bclug.ca wrote:
> Mike Wayne wrote on 2024-04-12 15:55:
>
> I think JSON should do it via `jq`.
Any idea what package jq might be in? Never heard of it.
> printf "%s last login %s from %s\n" $(lastlogin --libxo json | jq -r
>
Mike Wayne wrote on 2024-04-12 15:55:
Not too helpful.
-f specifies the lastlogin FILE to use, not fields
Ugh, confidently wrong.
As mentioned, I'm trying to use --libxo text, not xml
That's my dumb mistake.
Looking to get lastlogin to print a single line:
wayne last
On Fri, Apr 12, 2024 at 01:21:58PM -0700, Ron / BCLUG wrote:
> Mike Wayne wrote on 2024-04-12 12:57:
>
> > What I can not figure out is how to select fields to print.
>
> To customize the output fields for the lastlogin command using libxo
> with XML formatting in FreeBSD, you'll need to use
Ron / BCLUG wrote on 2024-04-12 13:28:
Let us know if that works?
By the way, the prompt I gave ChatGPT (which requires no login these days):
using freebsd, how to choose output fields for command lastlogin
--libxo xml,pretty ?
___
Semibug
(Apologies if this is a duplicate - been mucking about with email server
settings.)
Mike Wayne wrote on 2024-04-12 12:57:
What I can not figure out is how to select fields to print.
To customize the output fields for the lastlogin command using libxo
with XML formatting in FreeBSD,
Mike Wayne wrote on 2024-04-12 12:57:
What I can not figure out is how to select fields to print.
To customize the output fields for the lastlogin command using libxo
with XML formatting in FreeBSD, you'll need to use the -f option to
specify the fields you want to include. Here's how you
Trying to correct some of the stupid that FreeBSD 13 did, I'm failing
to get libxo to work.
I ran lastlogin with the xml option to get the keys:
% lastlogin --libxo xml,pretty wayne
wayne
pts/1
192.168.63.146
Fri Apr 12 15:06:16 2024
What I can