[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Can we kill net-tools, please?



Bernd Zeimetz <bernd@bzed.de> writes:
> On 12/29/2016 07:04 PM, Lars Wirzenius wrote:

>> For stretch+1, what I'd like to see is a tool that a) works b) has
>> output that's nice for a human to read and c) has output that can be
>> easily processed by programs. None of the current tools comes anywhere
>> near. Bonus points if the command line syntax is reasonbly nice, and
>> the manpage doesn't start with a BNF syntax description.

> In my opinion ip provides all the things you are mentioning - what are
> you missing? with -o as option the output is rather easy to parse.

It certainly doesn't provide a man page that doesn't start with a BNF
syntax description.  The iproute2 documentation is awful.

Also, this is not at all easy to parse:

# ip -o address
1: lo    inet 127.0.0.1/8 scope host lo\       valid_lft forever preferred_lft forever
1: lo    inet6 ::1/128 scope host \       valid_lft forever preferred_lft forever
3: wlan0    inet 192.168.0.195/24 brd 192.168.0.255 scope global dynamic wlan0\       valid_lft 598191sec preferred_lft 598191sec
3: wlan0    inet6 fe80::a288:69ff:fe31:2b62/64 scope link \       valid_lft forever preferred_lft forever

The fields aren't labeled, you have to make a bunch of assumptions about
ordering, the backslash thing is just completely bizarre and makes the
parsing way harder (see the "lo\" on the first line)... this is really
rather dire.

And the output (without -o) is less human-readable than the current
ifconfig output, although neither of them are going to win any awards.
ifconfig at least understands how to use whitespace to try to present
data, which ip definitely does not, but both have a lot of cryptic
abbreviations and provide a lot of uninteresting noise in the default
output format that's only useful in unusual situations.

ip address also has one of the worst output UI decisions I've ever seen,
namely this line:

    inet 192.168.0.195/24 brd 192.168.0.255 scope global dynamic wlan0

specifically "192.168.0.195/24", which is notation (IIRC) invented by this
command, used nowhere else in networking, and confusing to anyone who has
prior networking experience.

This is all probably a matter of opinion, but Lars is definitely not alone
in considering all this stuff to be quite bad.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>


Reply to: