From: Dmitri Seletski <drjoms@gmail.com>
To: netdev@vger.kernel.org
Subject: "ip help" output is an error
Date: Sat, 20 Jun 2026 10:36:31 +0100 [thread overview]
Message-ID: <62f09fe8-899c-4d22-b7a1-67e2745613df@gmail.com> (raw)
Hello iproute2 maintainers,
I am reporting an inconsistency regarding the exit status of the ip help
command.
Current Behavior:
When running ip help, the command prints the help documentation to
stdout, but exits with a non-zero status (error). This causes issues in
shell scripts that rely on exit codes for control flow.
Steps to reproduce:
bash
# This returns "FAIL" because the exit code is non-zero
if ip help > /dev/null; then
echo "SUCCESS"
else
echo "FAIL"
fi
Expected Behavior:
Since the command successfully performs the requested task (displaying
help information) and does not encounter a system error, it should
return an exit code of 0.
Context:
This behavior breaks standard Bash logic for automation. For example:
ip help && echo "This will not execute"
"ip help |grep br" - this will bring no result.
Current version tested: iproute2-6.19.0
Thank you for your time and for maintaining this tool.
Regards,
Dmitri Seletski
next reply other threads:[~2026-06-20 9:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-20 9:36 Dmitri Seletski [this message]
2026-06-21 15:21 ` "ip help" output is an error Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=62f09fe8-899c-4d22-b7a1-67e2745613df@gmail.com \
--to=drjoms@gmail.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox