grep 多条件并行满足_用grep 查出符合多个条件的用法

news/2025/2/26 13:23:49

用grep 查出符合多个条件的用法

F:谁会用grep 查出符合多个条件的用法

比如我要对警告文件中的错误信息抓出来 关键字是:Errors ORA- .trc 该怎么写?

我的想法:

cat /u01/app/oracle/admin/sid/bdump/alert_sid.log | grep Errors ORA- .trc > Alert_sid_Error.txt

Q:grep | grep | grep 用多个管道

F:

cat /u01/app/oracle/admin/sid/bdump/alert_sid.log | grep Errors |grep ORA- |grep .trc > Alert_sid_Error.txt

好像是 AND 要 OR 该如何呢? 或者是 导入>a.err 时候是追加而并非是覆盖

Q:

and 就用管道

or的话用正则表达式

egrep "ora-4031|ora-4030|ora-00600" alert..

grep 'ORA- ' /u01/app/oracle/admin/sid/bdump/alert_sid.log >>a.err

grep 'Errors' /u01/app/oracle/admin/sid/bdump/alert_sid.log >>a.err

grep '.trc' /u01/app/oracle/admin/sid/bdump/alert_sid.log >>a.err

分享到:

18e900b8666ce6f233d25ec02f95ee59.png

72dd548719f0ace4d5f9bca64e1d7715.png

2007-12-13 17:06

浏览 359

评论


http://www.niftyadmin.cn/n/605977.html

相关文章

Windows 8实用窍门系列:7.Windows 8 中的三种进度条和两种定时器

在Windows 8中的默认进度条也与时俱进,和之前Silverlight中的不一样。本文将讲述三种不同的进度条,另外在本文中也会将两种定时器。 进度条 主要属性: Value:当前进度值。 Maximum:最大进度值。 IsIndeterminate:指定进度条是否确…

python初识(四)

python初识(四) 基本函数 基础样式 def 函数名(参数列表):函数体returneg def add(a,b)c a bprint(id(c))return c d add(1,2) print(id(d)) print(d)def showP(person):for item in person:print(item) p ["hjx",30,1.6,100] showP(…

TreeView的有关操作

function StorePage() { ddocument; td.selection?(d.selection.type!None?d.selection.createRange().text:):(d.getSelection?d.getSelection():); void(keyitwindow.open(http://www.365key.com/storeit.aspx?tescape(d.title)&uescape(d.location.href)&cescap…

【SQL语法】系列06:利用ORDER BY排序

默认为升序,如果希望按降序对记录进行排序,可使用 DESC 关键字。 Orders 表: Company OrderNumber IBM 3532 W3School 2356 Apple 4698 W3School 6953 例 1 以字母顺序显示公司名称: SELECT Company, OrderNumber FROM Orders ORDER…

将jar包发布到maven的中央仓库细节整理

在学习springboot框架的时候,会引入各种各样的starter依赖,照着教程尝试写了个demo-spring-boot-stater,可以理解为一个组件,随引随用 但是只能自己引用,无法共享,于是想将其发布到maven中央仓库 网上参考了…

蛙蛙推荐:一套.net窗体身份验证方案(解决了防止用户重复登陆,session超时等问题)...

function StorePage() { ddocument; td.selection?(d.selection.type!None?d.selection.createRange().text:):(d.getSelection?d.getSelection():); void(keyitwindow.open(http://www.365key.com/storeit.aspx?tescape(d.title)&uescape(d.location.href)&cescap…

详细解析Java中抽象类和接口的区别

在Java语言中, abstract class 和 interface 是支持抽象类定义的两种机制。正是由于这两种机制的存在,才赋予了Java强大的 面向对象能力。 abstract class和 interface之间在对于抽象类定义的支持方面具有很大的相似性,甚至可以相互替换&…

Python初识(五)---图书管理系统

图书管理系统 登录(加密) import xlrd from xlutils.copy import copy impot hashlib def login(username,password):#读取excel信息book xlrd.open_workbook("book.xls")sheet book.sheet_by_name("user")r sheet.nrowsc she…