> Hi All, > > I am trying to use the nmcli command to cough up > (a highly technical term) the connected state on > a particular network interface. > > According to the man page: > > nmcli device {status | show | set | connect | reapply > | modify | disconnect | delete | monitor | > wifi | lldp} [ARGUMENTS...] > ... > > status > Print status of devices. > > This is the default action if no command is > specified to nmcli device. > > So here goes without the device: > > $ nmcli device status > DEVICE TYPE STATE CONNECTION > br0 bridge connected System br0 > virbr0 bridge connected virbr0 > eno2 ethernet connected eno2 > eno1 ethernet unavailable -- > lo loopback unmanaged -- > virbr0-nic tun unmanaged -- > > So far so good. > > Now the specify as "specified" device: > > $ nmcli device status eno2 > Error: invalid extra argument 'eno2'. > > Okay, what am I doing wrong/misreading? > > Yes, I know I can use grep and awk. I will be > using Raku though: > > $ nmcli device status | raku -ne 'for $_.lines -> $I > { if $I.contains( "connected" & "eno2" ) > { say "connected"; last }}' > > connected > > > Many thanks, > -T > > _______________________________________________ > users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx > To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx > Fedora Code of Conduct: > https://docs.fedoraproject.org/en-US/project/code-of-conduct/ > List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines > List Archives: > https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx > use show (instead of status) Try this: nmcli device show eno2 _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx