分类:
2007-04-10 10:52:00
查询sybase日志 里面的错误信息
sed -e '/2006\/05\/12/,$!d' /opt/sybase/ASE-12_5/install/SYBASE.log | egrep -ie '(warning|severity|fail|unmirror|mirror exit|not enough|error|suspect|corrupt|correct|deadlock|critical|allow|infect|error|full|problem|unable|not found|threshold|couldn|not valid|invalid|NO_LOG|logsegment|syslogs|stacktrace)'
删除行中注释(删除#后面所有字符)
sed 's/#.*$//g' config.ini |more
删除#开头的行
sed -e '/^#/d' config.ini
删除空白、注释行后打印2-6行
sed '/^$/d' config.ini|sed 's/#.*$//g' |sed -n '2,6p'