5/15/2023 0 Comments Grep for multiple strings![]() 14:20:13.240 INFO 1051 - o.s. : Root WebApplicationContext: initialization completed in 2629 ms : Initializing Spring embedded WebApplicationContext Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. 14:20:13.227 INFO 1051 - .TldScanner : At least one JAR was scanned for TLDs yet contained no TLDs. 14:20:12.725 INFO 1051 - .StandardEngine : Starting Servlet Engine: Apache Tomcat/8.5.14 14:20:12.697 ERROR 1051 - s.b.c.e.t.TomcatEmbeddedServletContainer : Tomcat initialized with port(s): 8080 (http) :: Spring Boot :: (v1.5.3.RELEASE) 14:20:10.519 INFO 1051 - o.a.j.SpringBootHelloWorldApplication : Starting SpringBootHelloWorldApplication on apples-MacBook-Air.local with PID 1051 (/Users/apple/Documents/WorkspaceAlgo/SpringBootHelloWorldExample/target/classes started by apple in /Users/apple/Documents/WorkspaceAlgo/SpringBootHelloWorldExample) Let’s say your application is deployed on linux machine and you need do analysis of log file and you need to find lines with the specific words in it.įor example: you want to find all the lines with “ WARNING” or “ DEBUG” words in it. ![]() In this post, we will see how to grep multiple Strings in linux. 5.Command to find “ERROR” or “DEBUG” in all logs files in the current folder in applicationLog.log file.$ grep -i ‘DEBUG\|ERROR’ applicationLog.log.4.Command to find “ERROR” or “DEBUG” witn case insensitive in applicationLog.log file in applicationLog.log file.$ grep -n ‘INFO.*DEBUG\|DEBUG.*INFO’ applicationLog.log.Command to find “INFO” and “DEBUG” with line number in applicationLog.log file. $ grep ‘INFO.*DEBUG\|DEBUG.*INFO’ applicationLog.log.Command to find “INFO” and “DEBUG” in applicationLog.log file. ![]() $ egrep ‘DEBUG|ERROR’ applicationLog.log.$ grep ‘DEBUG\|ERROR’ applicationLog.log.Command to find “ERROR” or “DEBUG” in applicationLog.log file Here is how to exclude files
0 Comments
Leave a Reply. |