grep 搜多行匹配多个字符串

grep -E  "Action调用接口发生异|WS统计接口返回结果:null" app-ncng.log

[test@TEST007 log]$ grep -E  "Action调用接口发生异|WS统计接口返回结果:null" app-ncng.log
09:44:21,838 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-3) Action调用接口发生异常:请求参数不全
09:44:21,839 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-3) WS统计接口返回结果:null
10:25:40,735 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-3) Action调用接口发生异常:请求参数不全
10:25:40,736 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-3) WS统计接口返回结果:null
10:26:06,401 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-4) Action调用接口发生异常:请求参数不全
10:26:06,402 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-4) WS统计接口返回结果:null
10:42:03,967 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-1) Action调用接口发生异常:请求参数不全
10:42:03,967 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-1) WS统计接口返回结果:null
10:45:09,131 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-2) Action调用接口发生异常:请求参数不全
10:45:09,132 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-2) WS统计接口返回结果:null
10:49:28,497 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-2) Action调用接口发生异常:请求参数不全
10:49:28,497 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-2) WS统计接口返回结果:null
10:52:33,128 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-2) Action调用接口发生异常:请求参数不全
10:52:33,129 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-2) WS统计接口返回结果:null
11:00:36,759 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-4) Action调用接口发生异常:请求参数不全
11:00:36,760 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-4) WS统计接口返回结果:null
11:10:45,228 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-2) Action调用接口发生异常:请求参数不全
11:10:45,229 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-2) WS统计接口返回结果:null
11:11:05,754 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-4) Action调用接口发生异常:请求参数不全
11:11:05,755 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-4) WS统计接口返回结果:null
11:12:42,992 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-1) Action调用接口发生异常:请求参数不全
11:12:42,992 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-1) WS统计接口返回结果:null
13:57:52,474 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-3) Action调用接口发生异常:请求参数不全
13:57:52,475 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-3) WS统计接口返回结果:null
14:06:55,332 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-3) Action调用接口发生异常:请求参数不全
14:06:55,333 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-3) WS统计接口返回结果:null
14:12:53,170 ERROR [com.mc.action.Action10090] (http--172.32.51.7-8406-4) Action调用接口发生异常:请求参数不全
14:12:53,171 INFO  [com.mc.action.Action10021] (http--172.32.51.7-8406-4) WS统计接口返回结果:null

猜你喜欢

转载自hus2013.iteye.com/blog/2230889