Skip to content

Instantly share code, notes, and snippets.

@yfarjoun
Created October 30, 2023 15:26
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 yfarjoun/94aa4d4c352af0000349e5e10f3b3aba to your computer and use it in GitHub Desktop.
Save yfarjoun/94aa4d4c352af0000349e5e10f3b3aba to your computer and use it in GitHub Desktop.
bash `table`
# instead of doing sort | uniq -c this will count with little overhead the various lines that you sent at it
awk '{table[$0]+=1} END {for (entry in table) {print entry, table[entry]}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment