Skip to content

Instantly share code, notes, and snippets.

@thinkerbot
Created October 4, 2011 19:52
Show Gist options
  • Save thinkerbot/1262610 to your computer and use it in GitHub Desktop.
Save thinkerbot/1262610 to your computer and use it in GitHub Desktop.
linecook considerations
cat > input.csv <<DOC
1,a
2,a
3,b
4,c
5,a
6,b
DOC
cut -d ',' -f 2 < input.csv | uniq -c
# 2 a
# 1 b
# 1 c
# 1 a
# 1 b
cut -d ',' -f 2 | uniq -c < input.csv
# 1 1,a
# 1 2,a
# 1 3,b
# 1 4,c
# 1 5,a
# 1 6,b
### HANG ###
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment