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 datagron- makes JSON greppable. Super useful for people like me who cannot figure out thejqfilters by simply looking at JSON code, get enlightened bygronandgron --ungron.jc- ideal forCOMMAND | jc PARSER [OPTIONS]use cases
In addition to iproute2, some systemd provided *ctl command supports JSON output format as well. Most commonly used ones
systemctljournalctl- …
Examples
1 | # systemctl status |
Have fun processing JSON with turbocharged productivity ;-)
EOF