dir /proc | where name -starts k | sort-by modified
possible output: ┌───────────┬────┬───────────────┬────────┐
│ name │type│ size │modified│
├───────────┼────┼───────────────┼────────┤
│kcore │file│140737471590400│09:32:44│
│kmsg │file│ 0│09:32:49│
│kallsyms │file│ 0│09:32:50│
│kpageflags │file│ 0│10:42:53│
│keys │file│ 0│10:42:53│
│kpagecount │file│ 0│10:42:53│
│key-users │file│ 0│10:42:53│
│kpagecgroup│file│ 0│10:42:53│
└───────────┴────┴───────────────┴────────┘
Another example: ip -j route | select dst dev prefsrc | to json1
possible output: [{"dst":"default","dev":"eth0"},
{"dst":"192.168.0.0/24","dev":"eth0","prefsrc":"192.168.0.2"}]
Internally, objects are serialized before writing them to a pipe - by default as NDJSON, but it can be set manually -
and deserialized when reading them from a pipe.
Full story (in Italian) at https://www.wired.it/internet/web/2020/06/30/progetto-gutenb...