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 Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s