Last active
May 11, 2017 03:33
-
-
Save ScalaWilliam/704b935572ad487a9693d631d64d4afe to your computer and use it in GitHub Desktop.
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
cut -c 1-10,20- | \ | |
cut -f 1,2 -d $'\t' | \ | |
mawk -F $'\t' -v OFS=$'\t' '$1 == last_date { counts[$2]++; } $1 != last_date { for ( i in counts ) print last_date, counts[i], i; last_date = $1; delete counts; }; END {for ( i in counts ) print last_date, counts[i], i;}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment