Mike,

I assume you want to run this from cron. 
If so, I recommend always using complete 
paths when referring to executables, as the 
other Mike suggested. If you use any more
than once, especially commands with long
paths, put that path in an environment 
variable:

ECHO=/bin/echo
MAIL=/bin/mail
$ECHO "Email message body here." | $MAIL -s "Email subject" me at domain.com

Or, you can go overboard and "variablize"
everything:

ECHO=/bin/echo
MAIL=/bin/mail
BODY="Email message body here."
SUB="Email subject"
ADDR=me at domain.com
$ECHO $BODY | $MAIL -s $SUB $ADDR

but that's just crazy. ;-)

Actually, it can be nice to reduce longer command 
lines so they fit on one line and make immediate
sense to the reader.

Good luck,

Troy

>>> mtuller at ce.anoka.k12.mn.us 10/22/04 04:50PM >>>
I have created a script to backup files on a system, and want to set it
so
that when the backup is completed it will send an email to me. That way I
can monitor if backups are being done. It looks like it has run, but I
don't
receive an email, so it must not be. Here is what I have as the part of
the
script that sends the email.
echo "Email message body here." | mail -s "Email subject" me at domain.com 
What is wrong with this?


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list