#/bin/sh
#get alert of everyday
#then name of file is everyday_alert.sh
dir="/oracle/admin/bbdz/bdump"
num=$(cat -n ${dir}/alert_bbdz.log | grep "`date|cut -c 1-10`"|head -n 1 |awk '{print $1}')
tail +${num} ${dir}/alert_bbdz.log >>/oracle/admin/bbdz/alert/alert_bbdz_`date + '%Y%m%d'`.log
crontab -e
58 23 * * * sh /oracle/script/every_alert.sh
阅读(1414) | 评论(0) | 转发(1) |