[NTLUG:Discuss] How to suppress null message body report from mail

Neil Aggarwal neil at JAMMConsulting.com
Wed Jun 1 11:19:36 CDT 2005


Hello:

I have a bash script which I run off a cron job.
It does some parsing of a log file and sends the result
to an email address using this command:

cat $LOG | egrep $PATTERN | /bin/mail -s $SUBJECT $RECIPIENTS

Sometimes, the patterns result in an empty message body
(Which is intentional), but I get a cron report with 
this:

Null message body; hope that's ok

Is there a way to suppress generating this message from
mail?  I have read the man page but I don't see anything
that will help.

Thanks,
	Neil

--
Neil Aggarwal, JAMM Consulting, (214) 986-3533, www.JAMMConsulting.com
FREE! Valuable info on how your business can reduce operating costs by
17% or more in 6 months or less! http://newsletter.JAMMConsulting.com





More information about the Discuss mailing list