You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Erik Hollensbe a4eb64ce46 Added output examples 7 years ago
jifaddrs make jifaddrs use an int mask instead of string 7 years ago
jroute jroute is json output of routes. 7 years ago
LICENSE.txt Licensed 7 years ago
README.md Added output examples 7 years ago

README.md

One of my pet peeves with network tools like iproute2, ifconfig, route are that they are terrible to parse.

With tools like jq out there now, parsing JSON in an awk style is a lot more realistic.

The two tools jifaddrs and jroute implement ifconfig and route in a read-only, JSON format for consumption. People who have used Chef's ohai will see several similarities. They accept no arguments and output to stderr on error, and stdout on success.

If you want something that is more friendly to standard unix tools like sed and awk, check out my tfip project.

Here is some example output from my workstation: jifaddrs, jroute.

Installation

You must have a go runtime, for now. The latest version you can get is usually best.

$ GOPATH=$HOME go get github.com/erikh/jsonlink/jifaddrs
$ GOPATH=$HOME go get github.com/erikh/jsonlink/jroute

AUTHOR

Erik Hollensbe github@hollensbe.org