On Wed, 2017-08-30 at 17:17 +0100, [email protected] wrote: > I've not used nmcli in any of its more intricate ways, but are there > some > easily-parsed commands which will allow me to tell whether an > Ethernet > interface is up (a la 'nmcli conn up/down') AND the cable is > connected > ('link/carrier state')? > I can grab some hints of the latter with /sys/class/net/eth0/carrier, > but > would prefer an approach that is harmonised through nmcli. Are there > a > couple of sub-commands that can be used rather than parsing the full > 'nmcli > dev show' output? e.g. to output a couple of specific fields. >
Hi, how about: LANG=C nmcli -t -m tabular -f WIRED-PROPERTIES.CARRIER device show "$DEV" Thomas
signature.asc
Description: This is a digitally signed message part
_______________________________________________ networkmanager-list mailing list [email protected] https://mail.gnome.org/mailman/listinfo/networkmanager-list
