On Mon, Aug 10, 2020 at 11:47 PM Mike Wright
<nob...@nospam.hostisimo.com> wrote:


> For me, Tom H has the right idea.

:) although there are many "right" answers.


> If Todd wants simple what's wrong with something like this:
>
> alias gateways="ip route list | awk '/^default/ {print}'"
> --or short form--
> alias gateways="ip r l | awk '/^default/ {print}'"

One nitpick:

"list" must now be an undocumented alias for "show", because it hasn't
been mentioned in "man ip-route" for 3 or 4 years; and was only
mentioned previously in the synopsis. If you scrolled down the body of
the man page, the documented command was "ip route show". IIRC, "man
ip-rule" (still?) has "list" in the synopsis and "show" in the body.

So, for short, "ip r s"; or, given that "show" is the default, "ip r".

PS1: I assume that "list" will be an alias forever, but who knows...

PS2: You have to be careful with short forms. "ip r s" is understood,
but "ip l s" isn't because it means "ip l set", not "ip l show". So
you need "ip l sh" if you don't want simply to use "ip l".
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
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@lists.fedoraproject.org

Reply via email to