Changed output of "ip help" from standard error to standard output. And Exit is now 0 instead of -1. "ip help|grep bridge" - now gives bridge syntax instead of flooding user with everything from "ip help". --- ip/ip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ip/ip.c b/ip/ip.c index e4b71bde..4627b61c 100644 --- a/ip/ip.c +++ b/ip/ip.c @@ -56,7 +56,7 @@ static void usage(void) __attribute__((noreturn)); static void usage(void) { -fprintf(stderr, +fprintf(stdout, "Usage: ip [ OPTIONS ] OBJECT { COMMAND | help }\n" "       ip [ -force ] -batch filename\n" "where  OBJECT := { address | addrlabel | fou | help | ila | ioam | l2tp | link |\n" @@ -72,7 +72,7 @@ static void usage(void) "                    -o[neline] | -t[imestamp] | -ts[hort] | -b[atch] [filename] |\n" "                    -rc[vbuf] [size] | -n[etns] name | -N[umeric] | -a[ll] |\n" "                    -c[olor]}\n"); -exit(-1); +exit(0); } static int do_help(int argc, char **argv) -- 2.53.0