邮件功能

 

 

#!/bin/ksh
PATH=/usr/local/bin:/usr/bin:$PATH

. $HOME/utility/macro/macro.env

EMAIL_LST=$ADMIN_DIR/email.lst
#EMAIL_LST=$ADMIN_DIR/email.tst

for iname in `cat $EMAIL_LST`
do
        sed -e 's/$/            /g' $REPORT_DIR/chk_conn.log_`date '+%y%m%d'` >$REPORT_DIR/1
     /bin/mailx -s "Check database Connection Summary" $iname <  $REPORT_DIR/1
#     /bin/mailx -s "Check database Connection Summary" $iname <  $REPORT_DIR/chk_conn.log_`date '+%y%m%d'` 
done

 

FAQ:

stream editor for filtering and transforming text

-e script, --expression=script

       add the script to the commands to be executed

posted @ 2016-11-03 15:40  feiyun8616  阅读(153)  评论(0编辑  收藏  举报