[Semibug] Need an example of libxo usage
Mike Wayne
semibug15 at post.wayne47.com
Fri Apr 12 15:57:43 EDT 2024
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
<lastlogin-information>
<lastlogin>
<user>wayne</user>
<tty>pts/1</tty>
<from>192.168.63.146</from>
<login-time seconds="1712948776">Fri Apr 12 15:06:16 2024</login-time>
</lastlogin>
</lastlogin-information>
What I can not figure out is how to select fields to print. Based
on what I can find, it looks like something like this should work:
lastlogin --libxo '("%s last logged in from %s at %s", user, from, login-time)' wayne
but it fails. I've tried tweaking quotes, backslashes, etc. with no luck.
Google can not find single example of libxo usage anywhere that
illustrates the corect way to specify key selection when using
the --libxo option with a command.
Can I get one?
More information about the Semibug
mailing list