iproute2 & systemd output in JSON format
TL;DR
Didn’t notice ip provided by iproute2 supports output in JSON format until I read about the motivation behind jc.
Example
| 1 | ip -j a | jq | 
main()
Must have JSON CLI utils for more productivity:
- jq- who doesn’t know?- sedfor JSON data
- gron- makes JSON greppable. Super useful for people like me who cannot figure out the- jqfilters by simply looking at JSON code, get enlightened by- gronand- gron --ungron.
- jc- ideal for- COMMAND | jc PARSER [OPTIONS]use cases
In addition to iproute2, some systemd provided *ctl command supports JSON output format as well. Most commonly used ones
- systemctl
- journalctl
- …
Examples
| 1 | # systemctl status | 
Have fun processing JSON with turbocharged productivity ;-)
EOF