Skip to content

Instantly share code, notes, and snippets.

@andcam
Created November 15, 2022 09:47
Show Gist options
  • Save andcam/55747f8a2ba5b3de2650b7ae27b6b793 to your computer and use it in GitHub Desktop.
Save andcam/55747f8a2ba5b3de2650b7ae27b6b793 to your computer and use it in GitHub Desktop.
sort and count lines in a text file
cat file.txt | sort | uniq -c | sort -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment