On Mon, 2019-07-29 at 21:59 +0200, Thomas Haller wrote:
> This shows fields of the connection-profile... There is a difference
> between the profile and the actual device.
> 
> Does `nmcli -f all device show $IFACE` help?

Hi,

Thanks! I was expecting to find the IP interface information at
connection level (together with IP addresses, routes, ..., which are
also listed there). But obviously my expectation was wrong.

The following works (basic version without error handling in case
<MYCONN> isn't connected):

IFACE=$(nmcli -g GENERAL.DEVICES con show <MYCONN>)
IP_IFACE=$(nmcli -g GENERAL.IP-IFACE dev show "$IFACE")
echo $IP_IFACE

Best wishes,
Joachim

_______________________________________________
networkmanager-list mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/networkmanager-list

Reply via email to