за ключ такой?
Видимо, у тебя там старая версия ip. У меня на системе ip уже поддерживает выдачу информации об интерфейсе в JSON'е
→ ip -f inet --json address show dev eth0 [{"ifindex":2,"ifname":"eth0","flags":["BROADCAST","MULTICAST","UP","LOWER_UP"],"mtu":1500,"qdisc":"fq_codel","operstate":"UP","group":"default","txqlen":1000,"addr_info":[{"family":"inet","local":"10.0.2.15","prefixlen":24,"broadcast":"10.0.2.255","scope":"global","dynamic":true,"noprefixroute":true,"label":"eth0","valid_life_time":61547,"preferred_life_time":50747},{"family":"inet","local":"1.2.3.4","prefixlen":32,"scope":"global","label":"eth0","valid_life_time":4294967295,"preferred_life_time":4294967295}]}]
Обсуждают сегодня