Introduce ifconfig -a -g groupname

Daniel Ebdrup Jensen debdrup at FreeBSD.org
Fri May 29 13:15:13 UTC 2020


On Fri, May 29, 2020 at 07:57:23PM +0700, Eugene Grosbein wrote:
>Hi!
>
>Currently "ifconfig -a" command that shows status of network interfaces
>may be combined with flags -d or -u to limit the list to interfaces that are down or up.
>
>The change https://reviews.freebsd.org/D25029 allows it to filter the list
>by name of interface group with additional flag -g groupname, or -g ^groupname to negate condition
>(this is different from "ifconfig -g groupname" that shows interface names only
>and that behaviour is not affected with the change).
>
>I chose caret symbol (^) was choosen to ease both scripted and interactive usage
>so it does not require extra quotation/escaping, but was told
>that caret would require escaping in the zsh.
>
>So I ask for suggestions which symbol to choose instead of caret.
>Benedict Reuschling suggested @ and I'm fine with it
>if we don't care about Perl code that would require escaping it when running shell code.
>
>For thouse who interested, these are supposed usage 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
>_______________________________________________
>freebsd-hackers at freebsd.org mailing list
>https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
>To unsubscribe, send any mail to "freebsd-hackers-unsubscribe at freebsd.org"

Hi Eugene,

There is at least some precedence for using @, because it is used to populate 
SES information into /dev; see the example below:

stat -s /dev/enc at n5006048005f1ebbe/type at 0/slot at f/da11
[snip irrelevant information]

So I don't mind it at all, and in fact look forward to it. :)

Yours,
Daniel Ebdrup Jensen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20200529/94a81c87/attachment.sig>


More information about the freebsd-hackers mailing list