cronic:tldr:bffe8
The command cronic ${command} is used to execute a given command and suppress any output or error messages unless the command fails.
Here's how it works:
-
The command
cronicis a Unix utility that serves as a wrapper for other commands. It captures and reports command output or errors only if the command fails (returns a non-zero exit status). If the command succeeds (returns a zero exit status),cronicwill suppress any output. -
${command}is a placeholder that represents the actual command that needs to be executed. It can be replaced with any valid command or a series of commands.
By using cronic ${command}, you can run a command while ignoring the output and errors unless the command fails. This can be useful for automated scripts or crontab entries where you want to receive notifications only when a command fails, but not for successful executions.