Which lines repeat most often in a stack trace?

I was looking at the stack trace of a stack overflow exception, and it’s looong (1172 lines). I wanted to just see which lines occurred most often. Easy enough with the right incantation of sort and uniq.

$ < stack.txt sort | uniq -c | sort -rh | head
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment