off
在第四行首加#注释
#!/bin/bash
sed -i ‘41s/^/#/g’ /var/spool/cron/root
在第四行行首去掉#
on
#!/bin/bash
sed -i ‘41s/^#//g’ /var/spool/cron/root
邮件发送内容和文件
#!/bin/bash
#
sender=XX@XX.com
passwd='XX!'
smtp=smtp.mxhichina.com
port=25
title=红包雨-gwent
msg='红包雨-'
alias=XX
to=(XX@x.com)
slowtext=/data/sed_mail_hongbao/红包雨数据.csv
for u in ${to[@]};do
/usr/bin/sendEmail -f $sender -t $u -s $smtp -xu $sender -xp $passwd -u $title -m $msg -a $slowtext -o message-charset=utf-8
done
#/usr/bin/sendEmail -f $sender -t $u -s $smtp -xu $sender -xp $passwd -u $title -m $msg -a $slowtext -o message-charset=utf-8