您现在的位置是:网站首页> 编程资料编程资料
提取oralce当天的alert log的shell脚本代码_linux shell_
2023-05-26
379人已围观
简介 提取oralce当天的alert log的shell脚本代码_linux shell_
提取oralce当天的alert log的shell脚本
复制代码 代码如下:
#/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
相关内容
- 检测网站down掉后自动发信的shell脚本代码_linux shell_
- shell脚本从SVN推送到多台服务器的代码_linux shell_
- 用expect实现的自动登录到多台服务器的shell脚本_linux shell_
- linux shell 中 2>&1的含义_linux shell_
- linux bash字符串处理大全_linux shell_
- 防止ARP攻击的shell代码_linux shell_
- ubuntu与centos中更换ip的shell代码_linux shell_
- awk中查看包含某两列字符的用法_linux shell_
- 利用kernel提供的接口打印进程号(pid)_linux shell_
- linux shell进度条实现方法_linux shell_
