Re: Preventing >empty< cron email messages...



On 29 Jan 2007 10:50:18 -0800, Nedron
<usenet@xxxxxxxxxx> wrote:


Is there a known mechanism for preventing empty email messages being
sent by cron jobs?

Basically, we have several cron jobs that always generate a message on
every run. The messages may or may not have content in the body. We
want messages with content to be sent, but empty messages to be /dev/
null'd.

Obviously, the usual "> /dev/null 2>&1" style or MAILTO directives
won't work, since we actually do want some messages to make it out of
the box for this job, but not the empty ones.

2>&1 | grep -v '^$'


--
I can't understand why a person will take a year or two to write a
novel when he can easily buy one for a few dollars.
-- Fred Allen
.



Relevant Pages

  • Re: Preventing >empty< cron email messages...
    ... Bill Marcum writes: ... Is there a known mechanism for preventing empty email messages being ... we have several cron jobs that always generate a message on ...
    (comp.os.linux.misc)
  • Preventing >empty< cron email messages...
    ... Is there a known mechanism for preventing empty email messages being ... we have several cron jobs that always generate a message on ... Should I be looking at sendmail for this? ...
    (comp.os.linux.misc)