]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ifconfig(8): make it possible to filter output by interface group.
authoreugen <eugen@FreeBSD.org>
Thu, 4 Jun 2020 14:44:44 +0000 (14:44 +0000)
committereugen <eugen@FreeBSD.org>
Thu, 4 Jun 2020 14:44:44 +0000 (14:44 +0000)
commitdd5a75d38669588e7ddaf952e04dd93722533c0b
treec272886b28449d2e82255508273e013455e2a365
parentad5077cb33df74c932dedea229ff37e42df8870d
ifconfig(8): make it possible to filter output by interface group.

Now options -g/-G allow to select/unselect interfaces by groups
in the "ifconfig -a" output just like already existing -d/-u.

Examples:

to exclude loopback from the list: ifconfig -a -G lo
to show vlan interfaces only: ifconfig -a -g vlan
to show tap interfaces that are up: ifconfig -aug tap

Arguments to -g/-G may be shell patterns and both may be specified.
Later options -g/-G override previous ones.

MFC after: 2 weeks
Relnotes: yes
Differential Revision: https://reviews.freebsd.org/D25029
sbin/ifconfig/ifconfig.8
sbin/ifconfig/ifconfig.c