标签:line 1: dump: command not found
最近做一个实验,要监控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脚本不能一点马虎啊,搞死人!以后要真的很注意
本文出自 “O Record” 博客,请务必保留此出处http://evils798.blog.51cto.com/8983296/1420871
line 1: Dump: command not found,布布扣,bubuko.com
line 1: Dump: command not found
标签:line 1: dump: command not found
原文地址:http://evils798.blog.51cto.com/8983296/1420871