最近做一个实验,要监控oracle的alert日志,脚本写好后发现执行报如下错误,但结果可以正常输出 [root@localhost ~]# sh tt.sh /root/alert: line 1: Dump: command not found /root/alert: line 2: Fri: command not found /root/alert: line 3: ORACLE: command not found /root/alert: line 5: Windows: command not found /root/alert: line 6: CPU: command not found /root/alert: line 7: Process: command not found /root/alert: line 8: syntax error near unexpected token `Avail/Total' 'root/alert: line 8: `Memory (Avail/Total): Ph:1943M/3062M, Ph+PgF:3654M/4953M, VA:1937M/2047M CHECKING ORACLE ALERT FILE 检查了半天没检查出来到底是哪错了,以下是脚本的部分内容 #查找日志文件结果 d= `find /root -name alert` #过滤ORA-错误 c=`tail -2000 /root/alert | grep ORA-` #判断条件 #如果文件存在,则进行日志扫描 if [ -e $d ];then echo "CHECKING ORACLE ALERT FILE " fi 最后发现d= `find /root -name alert`处“=”后多了个空格,将空格去掉后,脚本顺利执行 shell脚本不能一点马虎啊,搞死人!以后要真的很注意
line 1: Dump: command not found
精选 转载文章标签 line 1: Dump: comman 文章分类 运维
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Java Thread Dump文件分析
Java Thread Dump文件分析
java 堆栈 Java -
Command line is too long. Shorten command line for
想看更多算法题,可以扫描上方二维码关注我微信公众号“数据结构和算法”,截止到目前我已经在公众号中更新了
Command line 运行报错 公众号 ide 微信公众号