supuner (SUPpress UNless ERror)
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.



supuner (SUPpress UNless ERror) executes a command and manipulates its stderr
and stdout, allowing the user control over when they are displayed and / or
outputted. It has two chief uses:

  * Suppressing all output from a command unless there is an error, in which
    case the combined output of stderr and stdout is sent to stderr. This is
    useful for `chatty' scripts in cron jobs: if they run successfully,
    receiving an e-mail from them is distracting.

  * For long-running processes (e.g. database processing jobs running inside
    screen / tmux), sending output to both the console and a log-file. If an
    error occurs, the log file can then be e-mailed to an appropriate person.