Skip to content

Instantly share code, notes, and snippets.

@palawer
Created August 16, 2020 10:31
Show Gist options
  • Save palawer/6e795637ace67729a0826aaa30185281 to your computer and use it in GitHub Desktop.
Save palawer/6e795637ace67729a0826aaa30185281 to your computer and use it in GitHub Desktop.
Group by a column and count
# $2 column number (starts at 1)
awk -F ',' '{print $2}' file.csv | sort | uniq -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment