Last active
August 29, 2015 14:12
-
-
Save pontikos/4b62d64d863def0c5c6f to your computer and use it in GitHub Desktop.
Counts occurences of a field in output.
This file contains hidden or 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
| #! /usr/bin/awk -f | |
| { | |
| count[$1]++ | |
| } | |
| END { | |
| sort = "sort -n" | |
| for(j in count) | |
| print j, count[j] | sort | |
| close(sort) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment