Skip to content
Advertisement

Find all jvm log files with “Exception” message and list the count of uniq exceptions

I have a list of jvm log files that I need to search for Exception and then list the count of each unique exception .

JavaScript

Following is the command I am using:

JavaScript

This gives me output of total exception count in each file :

JavaScript

How do I modify the command to get the unique exception count?

JavaScript

Advertisement

Answer

you can use awk to get fifth column then sort and uniq -c will do the work

JavaScript
Advertisement