Created
September 15, 2010 17:24
-
-
Save chluehr/581090 to your computer and use it in GitHub Desktop.
Count number of unique lines in a file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# sample.csv contains: <id>;<data> , e.g. 33;fooooo | |
# script counts how many lines with the same id exist, cnt DESC | |
cut -f1 -d\; sample.csv | uniq -c -d | sort -n -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment