@sni you should understand how shell parser works. wc and grep are not ran under sudo, they are next command in pipe chain, if *want* them to run under sudo, you must prepend sudo to each of them
why it works is likely "ip" command does not require root access, and sudo will just include `/sbin` in path so the program is visible. solution: use abs path. however i kept sudo, because depending on kernel hardening `ip` via `sudo` may give more information than under normal user. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/pull/1440#issuecomment-259276088