Skip to content
jc-rs
GitHub

who

--whov1.6.0

Converts `who` command output to JSON

command
$ who | jc-rs --who

A real pair

From the reference corpus (centos-7.7/who.json). The left pane is the input the fixture ships; the right pane is the corpus's expected JSON. CI compares jc-rs with it field by field under the published differential. Hover a value to see where it came from.

whocentos-7.7
kbrazil  ttyS0        2020-02-29 12:14
kbrazil  pts/0        2020-02-29 18:43 (192.168.71.1)
expected outputjson
Use the Left and Right arrow keys to highlight the matching value in the input.
[
  {
    "user": "kbrazil",
    "tty": "ttyS0",
    "time": "2020-02-29 12:14",
    "epoch": 1583007240
  },
  {
    "user": "kbrazil",
    "tty": "pts/0",
    "time": "2020-02-29 18:43",
    "from": "192.168.71.1",
    "epoch": 1583030580
  }
]

Fixture coverage

8/8oracle-valid pairs match under the published structural JSON comparison

Magic syntax

jc-rs whojc-rs runs the command itself and parses what it prints. Recognised for: `who`

Source: crates/jc-rs-parsers/src/misc/who.rs. jc-rs targets the schemas defined by the original Python tool. Fixture coverage above is the measured evidence for this parser; test the inputs your pipeline depends on. Compare