I have to make script that sends some log files to myself via sendmail,
so can anybody help me with script syntax?
Thanks4help
tt
SUBJECT="Here's your logs `date`"
SENDTO="bill tom ellen jack somebody@somewhereelse
ever...@aol.com"
FILE=/var/syslog
mail -s "$SUBJECT" $SENDTO < $FILE
Is that what you want?
--
Tony Lawrence (to...@aplawrence.com)
SCO articles, help, book reviews, tests,
job listings and more : http://www.ApLawrence.com
> I have to make script that sends some log files to myself via sendmail,
> so can anybody help me with script syntax?
Tony posted the more traditional way. If you insist on using 'sendmail',
a quick look at the man-page suggests I do something like this:
517$ echo "."|/usr/lib/sendmail -bm swertz < /usr/adm/messages
Sometimes people wonder "where did the rest of my mail message
go", only to find that somewhere in the message was a line that started
with and contained only a single dot/period (which truncates a
message in mail/mailx, regardless of '[un]set dot' in your ~/.mailrc').
-sw