Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save squallstar/7f08277c8525a4c43efa364dd2672e32 to your computer and use it in GitHub Desktop.
Save squallstar/7f08277c8525a4c43efa364dd2672e32 to your computer and use it in GitHub Desktop.
Find and sort unique matches in log file
cat file.log | grep 'edition_id=[0-9][0-9][0-9][0-9][0-9]' -o | sort | uniq -c | sort -nr
4670 edition_id=22579
3554 edition_id=22627
1911 edition_id=22586
1168 edition_id=22482
1128 edition_id=22651
1035 edition_id=21786
1014 edition_id=22462
896 edition_id=22618
804 edition_id=22452
773 edition_id=22553
760 edition_id=22102
89 edition_id=22554
32 edition_id=22486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment