Hacker News new | ask | show | jobs
by pR0Ps 1857 days ago
For 2, see chronic[0] (part of moreutils[1]). It runs a command, muting stdout and stderr unless the command exits with a non-zero status.

[0]: https://manpages.debian.org/jessie/moreutils/chronic.1.en.ht...

[1]: https://joeyh.name/code/moreutils/