4 ms·
Though it's pretty immature, nushell has a similar idea, with its own internal data model being streams of structured, typed data: https://www.nushell.sh/ https
by Freaky 7y ago
Though it's pretty immature, nushell has a similar idea, with its own internal data model being streams of structured, typed data: https://www.nushell.sh/ https://www.nushell.sh/
And back to nix commands, libxo is used by a chunk of the FreeBSD base tools to offer output in JSON, amongst other things: https://github.com/Juniper/libxo https://github.com/Juniper/libxo
-% ps --libxo=json,pretty
{
"process-information": {
"process": [
{
"pid": "52455",
"terminal-name": "5 ",
"state": "Is",
"cpu-time": "0:00.00",
"command": "-sh (sh)"
},
-% uptime --libxo=json,pretty
{
"uptime-information": {
"time-of-day": " 8:34p.m.",
"uptime": 1730360,
"days": 20,
Be nice to see more tools converted.
- gerdesj 7y ago# ip -j a | jq